#include <CudappMemoryArray.h>
Public Member Functions | |
| void | Allocate (size_t width, size_t height) |
| virtual bool | CopyFrom (const void *src, size_t byte_count, size_t offset=0, MemoryLocation src_loc=MemoryOnHost) |
| virtual bool | CopyTo (void *dst, size_t byte_count, size_t offset=0, MemoryLocation dst_loc=MemoryOnHost) const |
| void | DeepCopy (MemoryArray *source) |
| virtual void | Free () |
| frees all the resources needed for the Array | |
| cudaArray * | GetArray () const |
| const cudaChannelFormatDesc & | GetDescriptor () const |
| size_t | GetHeight () const |
| size_t | GetWidth () const |
| MemoryArray (const MemoryArray &) | |
| MemoryArray () | |
| virtual void | MemSet (int value) |
| MemoryArray & | operator= (const MemoryArray &) |
| virtual void | PrintSelf (std::ostream &os) const |
| void | SetChannelDescriptor (const cudaChannelFormatDesc &desc) |
| template<typename T > | |
| void | SetFormat () |
| virtual | ~MemoryArray () |
Protected Attributes | |
| cudaArray * | Array |
| The Array with the memory that was allocated. | |
| cudaChannelFormatDesc | Descriptor |
| The Descriptor used to allocate memory. | |
| size_t | Height |
| The Height of the Array. | |
| size_t | Width |
| The Width of the Array. | |
| Cudapp::MemoryArray::MemoryArray | ( | ) |
References Array, Descriptor, Height, Cudapp::MemoryBase::Location, Cudapp::MemoryBase::MemoryOnDevice, and Width.
| Cudapp::MemoryArray::~MemoryArray | ( | ) | [virtual] |
References Free().
| Cudapp::MemoryArray::MemoryArray | ( | const MemoryArray & | ) |
| void Cudapp::MemoryArray::Allocate | ( | size_t | width, | |
| size_t | height | |||
| ) |
Allocates A new array of size width*height with the specified type T
| width | the width of the array to allocate | |
| height | the height of the array to allocate. |
References Array, Descriptor, Free(), Height, Cudapp::MemoryBase::Size, and Width.
Referenced by DeepCopy().
| virtual bool Cudapp::MemoryArray::CopyFrom | ( | const void * | src, | |
| size_t | byte_count, | |||
| size_t | offset = 0, |
|||
| MemoryLocation | src_loc = MemoryOnHost | |||
| ) | [inline, virtual] |
Implements Cudapp::MemoryBase.
| virtual bool Cudapp::MemoryArray::CopyTo | ( | void * | dst, | |
| size_t | byte_count, | |||
| size_t | offset = 0, |
|||
| MemoryLocation | dst_loc = MemoryOnHost | |||
| ) | const [inline, virtual] |
Implements Cudapp::MemoryBase.
| void Cudapp::MemoryArray::DeepCopy | ( | MemoryArray * | source | ) |
References Allocate(), Array, GetHeight(), and GetWidth().
| void Cudapp::MemoryArray::Free | ( | ) | [virtual] |
frees all the resources needed for the Array
Implements Cudapp::MemoryBase.
References Array, Height, Cudapp::MemoryBase::Size, and Width.
Referenced by Allocate(), and ~MemoryArray().
| cudaArray* Cudapp::MemoryArray::GetArray | ( | ) | const [inline] |
| const cudaChannelFormatDesc& Cudapp::MemoryArray::GetDescriptor | ( | ) | const [inline] |
| size_t Cudapp::MemoryArray::GetHeight | ( | ) | const [inline] |
Referenced by DeepCopy(), and PrintSelf().
| size_t Cudapp::MemoryArray::GetWidth | ( | ) | const [inline] |
Referenced by DeepCopy(), and PrintSelf().
| virtual void Cudapp::MemoryArray::MemSet | ( | int | value | ) | [inline, virtual] |
Implements Cudapp::MemoryBase.
| MemoryArray& Cudapp::MemoryArray::operator= | ( | const MemoryArray & | ) |
Reimplemented from Cudapp::MemoryBase.
| void Cudapp::MemoryArray::PrintSelf | ( | std::ostream & | os | ) | const [virtual] |
Reimplemented from Cudapp::MemoryBase.
References GetHeight(), and GetWidth().
| void Cudapp::MemoryArray::SetChannelDescriptor | ( | const cudaChannelFormatDesc & | desc | ) | [inline] |
| void Cudapp::MemoryArray::SetFormat | ( | ) | [inline] |
cudaArray* Cudapp::MemoryArray::Array [protected] |
The Array with the memory that was allocated.
Referenced by Allocate(), DeepCopy(), Free(), and MemoryArray().
cudaChannelFormatDesc Cudapp::MemoryArray::Descriptor [protected] |
The Descriptor used to allocate memory.
Referenced by Allocate(), and MemoryArray().
size_t Cudapp::MemoryArray::Height [protected] |
The Height of the Array.
Referenced by Allocate(), Free(), and MemoryArray().
size_t Cudapp::MemoryArray::Width [protected] |
The Width of the Array.
Referenced by Allocate(), Free(), and MemoryArray().
1.6.1