Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



Loading...
Searching...
No Matches
PvCudaBuffer.h
1// *****************************************************************************
2//
3// Copyright (c) 2025, Pleora Technologies Inc., All rights reserved.
4//
5// *****************************************************************************
6
7#ifndef __PVCUDABUFFER_H__
8#define __PVCUDABUFFER_H__
9
10#include <PvBufferLib.h>
11#include <PvPayloadType.h>
12#include <PvPixelType.h>
13
14namespace PvBufferLib
15{
16class CudaBuffer;
17class Buffer;
18} // namespace PvBufferLib
19
20enum class PvCudaMemorySpaceType
21{
22 PvCudaHost,
23 PvCudaDevice,
24 PvCudaUVM
25};
26
27class PvCudaBuffer;
28class PvBuffer;
29
43class PV_BUFFER_API PvCudaBuffer
44{
45public:
52
56 virtual ~PvCudaBuffer();
57
64 PvPayloadType GetPayloadType() const;
65
73 PvCudaMemorySpaceType GetMemorySpaceType() const;
74
85 const uint8_t* GetDataPointer() const;
86
92 uint8_t* GetDataPointer();
93
99 PvPixelType GetPixelType() const;
100
106 uint32_t GetSize() const;
107
119 PvResult AllocCudaHost( uint32_t aSize, PvPixelType aPixelType );
120
132 PvResult AllocCudaDevice( uint32_t aSize, PvPixelType aPixelType );
133
145 PvResult AllocCudaUVM( uint32_t aSize, PvPixelType aPixelType );
146
152 bool IsAllocated() const;
153
158 void Free();
159
165 PvResult Reallocate( uint32_t aSize );
166
170 PvResult CopyFrom( const PvBuffer* aSrcPvBuffer, unsigned int aSize );
171
175 PvResult CopyTo( PvBuffer* aDstPvBuffer, unsigned int aSize );
176
180 PvResult CopyFrom( const PvCudaBuffer* aSrcPvCudaBuffer, unsigned int aSize );
181
185 PvResult CopyTo( PvCudaBuffer* aDstPvCudaBuffer, unsigned int aSize );
186
187
188private:
189 // Not implemented
190 PvCudaBuffer( const PvCudaBuffer& );
191 const PvCudaBuffer& operator=( const PvCudaBuffer& );
192
193 friend class PvCudaBufferConverter;
194
195 PvBufferLib::CudaBuffer* mThis;
196};
197
198
199#endif
GVSP payload type constants.
PvPayloadType
GVSP payload type.
Definition PvPayloadType.h:20
@ PvPayloadTypeImage
Image payload type. Access from PvBuffer using PvBuffer::GetImage.
Definition PvPayloadType.h:27
PvPixelType
Definition PvPixelType.h:51
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition PvBuffer.h:111
Used to convert a PvBuffer to another pixel type.
Definition PvCudaBufferConverter.h:68
Represents a block of Cuda data in memory either on host, device side or both if using UVM.
Definition PvCudaBuffer.h:44
Result information.
Definition PvResult.h:30

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com