15#ifndef GPUCOMMONALGORITHMTHRUST_H
16#define GPUCOMMONALGORITHMTHRUST_H
18#pragma GCC diagnostic push
19#pragma GCC diagnostic ignored "-Wshadow"
20#include <thrust/sort.h>
21#include <thrust/execution_policy.h>
22#include <thrust/device_ptr.h>
23#pragma GCC diagnostic pop
28#define GPUCA_THRUST_NAMESPACE thrust::cuda
30#define GPUCA_THRUST_NAMESPACE thrust::hip
75GPUdi()
void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T*
end)
77 thrust::device_ptr<T> thrustBegin(begin);
78 thrust::device_ptr<T> thrustEnd(
end);
79 thrust::sort(GPUCA_THRUST_NAMESPACE::par, thrustBegin, thrustEnd);
82template <
class T,
class S>
83GPUdi()
void GPUCommonAlgorithm::sortDeviceDynamic(T* begin, T*
end,
const S& comp)
85 thrust::device_ptr<T> thrustBegin(begin);
86 thrust::device_ptr<T> thrustEnd(
end);
87 thrust::sort(GPUCA_THRUST_NAMESPACE::par, thrustBegin, thrustEnd,
comp);
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...