Class MessageArray3D::CUDAModelHandler
Defined in File MessageArray3DHost.h
Nested Relationships
This class is a nested type of Class MessageArray3D.
Inheritance Relationships
Base Type
public flamegpu::MessageSpecialisationHandler
(Class MessageSpecialisationHandler)
Class Documentation
-
class CUDAModelHandler : public flamegpu::MessageSpecialisationHandler
Blank handler, brute force requires no index or special allocations Only stores the length on device
Public Functions
-
explicit CUDAModelHandler(detail::CUDAMessage &a)
Constructor Allocates memory on device for message list length
- Parameters:
a – Parent CUDAMessage, used to access message settings, data ptrs etc
-
inline ~CUDAModelHandler()
Destructor. Should free any local host memory (device memory cannot be freed in destructors)
-
virtual void init(detail::CUDAScatter &scatter, unsigned int streamId, cudaStream_t stream) override
Allocates memory for the constructed index. Allocates message buffers, and memsets data to 0
- Parameters:
scatter – Scatter instance and scan arrays to be used (CUDASimulation::singletons->scatter)
streamId – The stream index to use for accessing stream specific resources such as scan compaction arrays and buffers
stream – The CUDAStream to use for CUDA operations
-
virtual void buildIndex(detail::CUDAScatter &scatter, unsigned int streamId, cudaStream_t stream) override
Sort messages according to index Detect and report any duplicate indicies/gaps
- Parameters:
scatter – Scatter instance and scan arrays to be used (CUDASimulation::singletons->scatter)
streamId – The stream index to use for accessing stream specific resources such as scan compaction arrays and buffers
stream – The CUDAStream to use for CUDA operations
-
virtual void allocateMetaDataDevicePtr(cudaStream_t stream) override
Allocates memory for the constructed index. The memory allocation is checked by build index.
-
virtual void freeMetaDataDevicePtr() override
Releases memory for the constructed index.
-
inline virtual const void *getMetaDataDevicePtr() const override
Returns a pointer to the metadata struct, this is required for reading the message data
-
explicit CUDAModelHandler(detail::CUDAMessage &a)