Public Member Functions | Protected Member Functions | List of all members
PxCudaBuffer Class Referenceabstract

Buffer which keeps informations about allocated piece of memory. More...

#include <PxCudaMemoryManager.h>

Public Member Functions

virtual PxCudaMemoryManagergetCudaMemoryManager () const =0
 Retrieves the manager over which the buffer was allocated. More...
 
virtual bool free ()=0
 Releases the buffer and the memory it used, returns true if successful. More...
 
virtual bool realloc (size_t size, NV_ALLOC_INFO_PARAMS_DECL(NULL, 0, NULL, UNASSIGNED))=0
 
virtual const PxCudaBufferTypegetType () const =0
 Returns the type of the allocated memory. More...
 
virtual PxCudaBufferPtr getPtr () const =0
 Returns the pointer to the allocated memory. More...
 
virtual size_t getSize () const =0
 Returns the size of the allocated memory. More...
 

Protected Member Functions

virtual ~PxCudaBuffer ()
 protected destructor More...
 

Detailed Description

Buffer which keeps informations about allocated piece of memory.

Constructor & Destructor Documentation

virtual PxCudaBuffer::~PxCudaBuffer ( )
inlineprotectedvirtual

protected destructor

Member Function Documentation

virtual bool PxCudaBuffer::free ( )
pure virtual

Releases the buffer and the memory it used, returns true if successful.

virtual PxCudaMemoryManager* PxCudaBuffer::getCudaMemoryManager ( ) const
pure virtual

Retrieves the manager over which the buffer was allocated.

virtual PxCudaBufferPtr PxCudaBuffer::getPtr ( ) const
pure virtual

Returns the pointer to the allocated memory.

virtual size_t PxCudaBuffer::getSize ( ) const
pure virtual

Returns the size of the allocated memory.

virtual const PxCudaBufferType& PxCudaBuffer::getType ( ) const
pure virtual

Returns the type of the allocated memory.

virtual bool PxCudaBuffer::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-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com