16#ifndef TMVA_DNN_ARCHITECTURES_CUDA_CUDABUFFERS
17#define TMVA_DNN_ARCHITECTURES_CUDA_CUDABUFFERS
20#include "cuda_runtime.h"
27template<
typename AFloat>
28class TCudaDeviceBuffer;
41template<
typename AFloat>
77 operator AFloat * ()
const;
96template<
typename AFloat>
132 operator AFloat * ()
const;
146template<
typename AFloat>
149 return (*fHostPointer + fOffset)[index];
152template<
typename AFloat>
155 return (*fHostPointer + fOffset)[index];
size_t fOffset
Offset for sub-buffers.
void SetComputeStream(cudaStream_t stream)
void CopyFrom(const TCudaHostBuffer< AFloat > &) const
void CopyTo(const TCudaHostBuffer< AFloat > &) const
struct TMVA::DNN::TCudaDeviceBuffer::TDestructor fDestructor
TCudaDeviceBuffer GetSubBuffer(size_t offset, size_t size)
Return sub-buffer of the current buffer.
TCudaDeviceBuffer & operator=(TCudaDeviceBuffer &&)=default
cudaStream_t fComputeStream
cudaStream for data transfer
TCudaDeviceBuffer & operator=(const TCudaDeviceBuffer &)=default
std::shared_ptr< AFloat * > fDevicePointer
Pointer to the buffer data.
TCudaDeviceBuffer()=default
TCudaDeviceBuffer(TCudaDeviceBuffer &&)=default
cudaStream_t GetComputeStream() const
TCudaDeviceBuffer(const TCudaDeviceBuffer &)=default
AFloat & operator[](size_t index)
struct TMVA::DNN::TCudaHostBuffer::TDestructor fDestructor
TCudaHostBuffer(AFloat *)
size_t fOffset
Offset for sub-buffers.
TCudaHostBuffer GetSubBuffer(size_t offset, size_t size)
Return sub-buffer of the current buffer.
TCudaHostBuffer & operator=(const TCudaHostBuffer &)=default
TCudaHostBuffer(TCudaHostBuffer &&)=default
TCudaHostBuffer()=default
cudaStream_t fComputeStream
cudaStream for data transfer
TCudaHostBuffer(const TCudaHostBuffer &)=default
std::shared_ptr< AFloat * > fHostPointer
Pointer to the buffer data.
TCudaHostBuffer & operator=(TCudaHostBuffer &&)=default
create variable transformations
TDestructor(const TDestructor &)=default
TDestructor(TDestructor &&)=default
void operator()(AFloat **devicePointer)
TDestructor & operator=(TDestructor &&)=default
TDestructor & operator=(const TDestructor &)=default
void operator()(AFloat **devicePointer)
TDestructor(const TDestructor &)=default
TDestructor(TDestructor &&)=default
TDestructor & operator=(TDestructor &&)=default
TDestructor & operator=(const TDestructor &)=default