mirror of
https://git.gfz-potsdam.de/naaice/poet.git
synced 2025-12-16 12:54:50 +01:00
refactor: conversion from R into C++ buffer inside worker function
This commit is contained in:
parent
bf9f369846
commit
d406409fae
@ -240,7 +240,17 @@ void ChemWorker::doWork(MPI_Status &probe_status) {
|
||||
}
|
||||
|
||||
/* convert grid to C domain */
|
||||
grid.exportWP(mpi_buffer_results);
|
||||
|
||||
std::vector<std::vector<double>> output =
|
||||
Rcpp::as<std::vector<std::vector<double>>>(R.parseEval("result_full"));
|
||||
|
||||
for (size_t i = 0; i < rowCount; i++) {
|
||||
for (size_t j = 0; j < colCount; j++) {
|
||||
mpi_buffer_results[i * colCount + j] = output[j][i];
|
||||
}
|
||||
}
|
||||
|
||||
//grid.exportWP(mpi_buffer_results);
|
||||
/* send results to master */
|
||||
MPI_Request send_req;
|
||||
MPI_Isend(mpi_buffer_results, count, MPI_DOUBLE, 0, TAG_WORK, MPI_COMM_WORLD,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user