15 #ifndef niftkCUDAManager_h
16 #define niftkCUDAManager_h
18 #include "niftkCUDAExports.h"
24 #include <cuda_runtime_api.h>
29 #include <boost/lockfree/queue.hpp>
83 struct StreamCallbackReleasePOD;
190 std::size_t TierToSize(
unsigned int tier)
const;
193 unsigned int SizeToTier(std::size_t
size)
const;
203 static void CUDART_CB AutoReleaseStreamCallback(cudaStream_t
stream, cudaError_t status,
void* userData);
211 void ReleaseReadAccess(
unsigned int id);
217 void ProcessAutoreleaseQueue();
222 static QMutex s_Lock;
224 unsigned int m_LastIssuedId;
227 std::vector<std::list<LightweightCUDAImage> > m_AvailableImagePool;
230 std::map<unsigned int, LightweightCUDAImage> m_InFlightOutputImages;
233 std::map<unsigned int, LightweightCUDAImage> m_ValidImages;
235 std::map<std::string, cudaStream_t> m_Streams;
238 boost::lockfree::queue<impldetail::StreamCallbackReleasePOD*> m_AutoreleaseQueue;
const void * m_DevicePointer
Definition: niftkCUDAManager.h:48
unsigned int m_PixelHeight
Definition: niftkCUDAManager.h:71
unsigned int m_PixelWidth
Definition: niftkCUDAManager.h:70
int m_FIXME_pixeltype
Definition: niftkCUDAManager.h:72
unsigned int m_PixelWidth
Definition: niftkCUDAManager.h:51
unsigned int m_BytePitch
Definition: niftkCUDAManager.h:50
Definition: niftkCUDAManager.cxx:71
GLuint GLuint stream
Definition: glew.h:6079
unsigned int m_Id
Definition: niftkCUDAManager.h:55
std::vcl_size_t m_SizeInBytes
Definition: niftkCUDAManager.h:68
cudaEvent_t m_ReadyEvent
Definition: niftkCUDAManager.h:56
unsigned int m_PixelHeight
Definition: niftkCUDAManager.h:52
ScopedCUDADevice(int dev)
cudaEvent_t m_ReadyEvent
Definition: niftkCUDAManager.h:75
unsigned int m_BytePitch
Definition: niftkCUDAManager.h:69
unsigned int m_Id
Definition: niftkCUDAManager.h:74
Definition: niftkCUDAManager.h:65
void * m_DevicePointer
Definition: niftkCUDAManager.h:67
std::vcl_size_t m_SizeInBytes
Definition: niftkCUDAManager.h:49
Definition: niftkCUDAManager.h:120
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1236
GLuint const GLchar * name
Definition: glew.h:1798
Definition: niftkCUDAManager.h:35
GLsizeiptr size
Definition: glew.h:1665
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1236
Definition: niftkCUDAManager.h:46
int m_FIXME_pixeltype
Definition: niftkCUDAManager.h:53
Definition: niftkLightweightCUDAImage.h:33
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194