Implemented acIntegrateStepWithOffset
This commit is contained in:
@@ -266,14 +266,19 @@ acIntegrateStep(const int& isubstep, const AcReal& dt)
|
|||||||
AcResult
|
AcResult
|
||||||
acIntegrateStepWithOffset(const int& isubstep, const AcReal& dt, const int3& start, const int3& end)
|
acIntegrateStepWithOffset(const int& isubstep, const AcReal& dt, const int3& start, const int3& end)
|
||||||
{
|
{
|
||||||
/*
|
WARNING("acIntegrateStepWithOffset called. This function has not been tested for correctness!");
|
||||||
// A skeleton function for computing integrations with arbitrary subblocks
|
for (int i = 0; i < num_devices; ++i) {
|
||||||
// Uncommenting the following should work with a single GPU.
|
// DECOMPOSITION OFFSET HERE
|
||||||
const int3 start = (int3){NGHOST, NGHOST, NGHOST};
|
const int3 d0 = (int3){NGHOST, NGHOST, NGHOST + i * subgrid.n.z};
|
||||||
const int3 end = (int3){NGHOST + subgrid.n.x, NGHOST + subgrid.n.y,
|
const int3 d1 = d0 + (int3){subgrid.n.x, subgrid.n.y, subgrid.n.z};
|
||||||
NGHOST + subgrid.n.z};
|
|
||||||
*/
|
const int3 da = max(start, d0);
|
||||||
rkStep(devices[0], STREAM_PRIMARY, isubstep, start, end, dt);
|
const int3 db = min(end, d1);
|
||||||
|
|
||||||
|
if (db.z >= da.z) {
|
||||||
|
rkStep(devices[i], STREAM_PRIMARY, isubstep, da, db, dt);
|
||||||
|
}
|
||||||
|
}
|
||||||
return AC_SUCCESS;
|
return AC_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user