feat: refactor precalculateAverageSpeed functions, remove redudent args

This commit is contained in:
kradchen
2024-11-29 15:28:09 +08:00
parent b599153837
commit c83c161bc6
6 changed files with 25 additions and 53 deletions

View File

@@ -228,8 +228,7 @@ void SAFTHandler::precalculateAscanIndex_usePaths(int ascanIndex_i, int aScanWin
CUDA_CHECK(cudaUnbindTexture(&texTableVoxelToReceiverPathSosBoth2_preprocess));
}
void SAFTHandler::precalculateAverageSpeedOfSound(int firstZLayer, int sosZLayerCount, int deviceListGeometry, int geometryElementCount, float *deviceVoxelCountOutputFloat,
float *deviceSpeedOfSoundSumOutput)
void SAFTHandler::precalculateAverageSpeedOfSound(int firstZLayer, int sosZLayerCount, int deviceListGeometry, int geometryElementCount)
{
dim3 threadsPerBlock(SOSGrid_XYZ.x, 1,
1); // max. 512 oder 1024 Threads werden vorgegeben und
@@ -284,14 +283,9 @@ void SAFTHandler::precalculateAverageSpeedOfSound(int firstZLayer, int sosZLayer
}
}
precalculateAverageSpeedOfSoundKernel<<<blocksPerGrid, threadsPerBlock>>>(deviceSosAttFieldCuArray, firstZLayer, sosZLayerCount, deviceListGeometry, geometryElementCount,
maxSoSReceiverArrayForTexture, // maximale Anzahl an Receivern in einem
// CUDA Array
// deviceVoxelCountOutput,
deviceVoxelCountOutputFloat, deviceSpeedOfSoundSumOutput,
// regionOfInterestOffset,
SOSGrid_XYZ, sosOffset, regionOfInterestOffset, IMAGE_RESOLUTION, SOS_RESOLUTION, debugMode, debugModeParameter);
precalculateAverageSpeedOfSoundKernel<<<blocksPerGrid, threadsPerBlock>>>(firstZLayer, sosZLayerCount, deviceListGeometry, geometryElementCount,
maxSoSReceiverArrayForTexture,
sosOffset, regionOfInterestOffset, IMAGE_RESOLUTION, SOS_RESOLUTION, debugMode, debugModeParameter);
CUDA_CHECK(cudaGetLastError());
CUDA_CHECK(cudaUnbindTexture(&texRefSosAttField));