Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GPU/GPUTracking/Base/GPUReconstruction.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int32_t GPUReconstruction::InitPhaseBeforeDevice()
}
if (mProcessingSettings.deterministicGPUReconstruction) {
#ifndef GPUCA_NO_FAST_MATH
GPUError("Warning, deterministicGPUReconstruction needs GPUCA_NO_FAST_MATH, otherwise results will never be deterministic!");
GPUError("Warning, deterministicGPUReconstruction needs GPUCA_NO_FAST_MATH for being fully deterministic, without only most indeterminism by concurrency is removed, but floating point effects remain!");
#endif
mProcessingSettings.overrideClusterizerFragmentLen = TPC_MAX_FRAGMENT_LEN_GPU;
param().rec.tpc.nWaysOuter = true;
Expand Down
22 changes: 18 additions & 4 deletions GPU/GPUTracking/Base/GPUReconstructionCPU.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,24 @@ inline int32_t GPUReconstructionCPUBackend::runKernelBackendInternal(const krnlS
template <>
inline int32_t GPUReconstructionCPUBackend::runKernelBackendInternal<GPUMemClean16, 0>(const krnlSetupTime& _xyz, void* const& ptr, uint64_t const& size)
{
int32_t ompThreads = std::max<int32_t>(1, std::min<int32_t>(size / (16 * 1024 * 1024), getNOMPThreads()));
if (ompThreads > 1) {
memset(ptr, 0, size);
} else {
#ifdef WITH_OPENMP
int32_t nOMPThreads = std::max<int32_t>(1, std::min<int32_t>(size / (16 * 1024 * 1024), getNOMPThreads()));
if (nOMPThreads > 1) {
GPUCA_OPENMP(parallel num_threads(nOMPThreads))
{
size_t threadSize = size / omp_get_num_threads();
if (threadSize % 4096) {
threadSize += 4096 - threadSize % 4096;
}
size_t offset = threadSize * omp_get_thread_num();
size_t mySize = std::min<size_t>(threadSize, size - offset);
if (mySize) {
memset((char*)ptr + offset, 0, mySize);
}
}
} else
#endif
{
memset(ptr, 0, size);
}
return 0;
Expand Down