Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
CachingAllocatorImpl.cuh
1 #ifndef SKA_CHEETAH_DATA_CUDA_CACHINGALLOCATORIMPL_H
2 #define SKA_CHEETAH_DATA_CUDA_CACHINGALLOCATORIMPL_H
3 #ifdef ENABLE_CUDA
4 
5 #include "cheetah/data/detail/CachingAllocatorImpl.h"
6 #include "cheetah/cuda_utils/cuda_thrust.h"
7 
8 namespace ska {
9 namespace cheetah {
10 namespace data {
11 
15 template <typename T>
16 class CachingAllocatorImpl<cheetah::Cuda,T>: public CachingAllocatorImplBase<CachingAllocatorImpl<cheetah::Cuda,T>,T>
17 {
18  private:
19  //friend the base class to access the cached blocks
20  friend class CachingAllocatorImplBase<CachingAllocatorImpl<cheetah::Cuda,T>,T>;
21 
22  //Directly allocate cuda memory
23  static T* _allocate(std::size_t num_elements);
24 
25  //Directly free cuda memory
26  static void _free(T* ptr);
27 };
28 
29 } // namespace data
30 } // namespace cheetah
31 } // namespace ska
32 
33 #include "cheetah/data/cuda/detail/CachingAllocatorImpl.cu"
34 
35 #endif //ENABLE_CUDA
36 #endif // SKA_CHEETAH_DATA_CUDA_CACHINGALLOCATORIMPL_H
Some limits and constants for FLDO.
Definition: Brdz.h:35