pxtask::NvCudaBuffer Class Reference
Buffer which keeps informations about allocated piece of memory. More...
#include <PxCudaMemoryManager.h>
Public Member Functions | |
virtual CudaMemoryManager * | getCudaMemoryManager () const =0 |
Retrieves the manager over which the buffer was allocated. | |
virtual bool | free ()=0 |
Releases the buffer and the memory it used, returns true if successful. | |
virtual bool | realloc (size_t size, NV_ALLOC_INFO_PARAMS_DECL(NULL, 0, NULL, UNASSIGNED))=0 |
virtual const CudaBufferType & | getType () const =0 |
Returns the type of the allocated memory. | |
virtual CudaBufferPtr | getPtr () const =0 |
Returns the pointer to the allocated memory. | |
virtual size_t | getSize () const =0 |
Returns the size of the allocated memory. | |
Protected Member Functions | |
virtual | ~NvCudaBuffer () |
protected destructor |
Detailed Description
Buffer which keeps informations about allocated piece of memory.Constructor & Destructor Documentation
virtual pxtask::NvCudaBuffer::~NvCudaBuffer | ( | ) | [inline, protected, virtual] |
protected destructor
Member Function Documentation
virtual bool pxtask::NvCudaBuffer::free | ( | ) | [pure virtual] |
Releases the buffer and the memory it used, returns true if successful.
virtual CudaMemoryManager* pxtask::NvCudaBuffer::getCudaMemoryManager | ( | ) | const [pure virtual] |
Retrieves the manager over which the buffer was allocated.
virtual CudaBufferPtr pxtask::NvCudaBuffer::getPtr | ( | ) | const [pure virtual] |
Returns the pointer to the allocated memory.
virtual size_t pxtask::NvCudaBuffer::getSize | ( | ) | const [pure virtual] |
Returns the size of the allocated memory.
virtual const CudaBufferType& pxtask::NvCudaBuffer::getType | ( | ) | const [pure virtual] |
Returns the type of the allocated memory.
virtual bool pxtask::NvCudaBuffer::realloc | ( | size_t | size, | |
NV_ALLOC_INFO_PARAMS_DECL(NULL, 0, NULL, UNASSIGNED) | ||||
) | [pure virtual] |
Realloc memory. Use to shrink or resize the allocated chunk of memory of this buffer. Returns true if successful. Fails if the operation would change the address and need a memcopy. In that case the user has to allocate, copy and free the memory with separate steps. Realloc to size 0 always returns false and doesn't change the state.
The documentation for this class was generated from the following file:
Copyright © 2008-2012 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com