Skip to content

Commit 6334d3a

Browse files
author
jgtong
authored
Merge pull request #49 from oneapi-src/jgt/reverse_time_migration/cpu
Fixed WaveFront Memory Handler (CPU Only)
2 parents 8be8f0d + 395dcef commit 6334d3a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

reverse_time_migration/libs/SeismicOperations/src/components/concrete/oneapi/memory-handlers/WaveFieldsMemoryHandler.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,26 @@ void WaveFieldsMemoryHandler::FirstTouch(float *ptr, GridBox *apGridBox, bool en
3131
/////assert(0);
3232
int nx, nz, compute_nx, compute_nz;
3333

34+
int iBlockX(0), iBlockZ(0);
3435
if (enable_window) {
3536
nx = apGridBox->GetActualWindowSize(X_AXIS);
3637
nz = apGridBox->GetActualWindowSize(Z_AXIS);
3738
compute_nx = apGridBox->GetComputationGridSize(X_AXIS);
3839
compute_nz = apGridBox->GetComputationGridSize(Z_AXIS);
40+
iBlockX = mpParameters->GetBlockX();
41+
iBlockZ = mpParameters->GetBlockZ();
3942
} else {
4043
nx = apGridBox->GetActualGridSize(X_AXIS);
4144
nz = apGridBox->GetActualGridSize(Z_AXIS);
4245
compute_nx = (nx - 2 * mpParameters->GetHalfLength());
4346
compute_nz = (nz - 2 * mpParameters->GetHalfLength());
47+
iBlockX = 1;
48+
iBlockZ = 1;
49+
4450
}
4551
OneAPIBackend::GetInstance()->GetDeviceQueue()->submit([&](handler &cgh) {
4652
auto global_range = range<2>(compute_nx, compute_nz);
47-
auto local_range = range<2>(mpParameters->GetBlockX(), mpParameters->GetBlockZ());
53+
auto local_range = range<2>(iBlockX, iBlockZ);
4854
auto starting_offset = id<2>(mpParameters->GetHalfLength(), mpParameters->GetHalfLength());
4955
auto global_nd_range = nd_range<2>(global_range, local_range, starting_offset);
5056
float *curr_base = ptr;

0 commit comments

Comments
 (0)