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>
79 inline operator AFloat * ()
const {
return data(); }
80 AFloat *
data()
const;
99template<
typename AFloat>
135 inline operator AFloat * ()
const {
return data(); }
136 AFloat *
data()
const;
153template<
typename AFloat>
156 return (*fHostPointer + fOffset)[
index];
159template<
typename AFloat>
162 return (*fHostPointer + fOffset)[
index];
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t 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
size_t GetUseCount() 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
void SetConstVal(const AFloat constVal)
Sets the entire buffer to a constant value.
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