![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Used for array in cpu of any other array. More...
Public Member Functions | |
| CellArray | Vector () const |
| CellArray | trans (stream_t &stream) |
| CellArray (long nxi, long nyi=1, T *pi=NULL, int own=1) | |
| CellArray (long nxi, long nyi, const CellArray &pi, long offset=0) | |
| CellArray () | |
| void | Zero (cudaStream_t stream=0) |
| void | Write (cudaStream_t stream, file_t *fp) const |
| void | Write (cudaStream_t stream, const char *format,...) const |
| void | deinit () |
| T & | operator() (int ix, int iy) |
| const T & | operator() (int ix, int iy) const |
| T * | operator() () |
| const T * | operator() () const |
| T & | operator() (int i) |
| const T & | operator() (int i) const |
| int | NRef () const |
| T * | Col (int icol) |
| const T * | Col (int icol) const |
| long | Nx () const |
| long | Ny () const |
| long | N () const |
| operator bool () const | |
| void | init (long nxi=0, long nyi=1) |
| Public Member Functions inherited from Array< T, CpuObj > | |
| ~Array () | |
| T & | operator() (int ix, int iy) |
| const T & | operator() (int ix, int iy) const |
| T & | R (int ix, int iy=0) |
| T * | Col (int icol) |
| const T * | Col (int icol) const |
| long | Nx () const |
| long | Ny () const |
| long | N () const |
| operator bool () const | |
| void | init (long nxi=0, long nyi=1) |
| Array () | |
| Array (long nxi, long nyi=1, T *pi=NULL, int own=1) | |
| Array (long nxi, long nyi, const Array &pi, long offset=0) | |
| Array (const Array &in) | |
| Array & | operator= (const Array &in) |
| Array | Vector () const |
| void | deinit () |
| operator T* () | |
| T * | operator() () |
| const T * | operator() () const |
| T & | operator() (int i) |
| const T & | operator() (int i) const |
| int | NRef () const |
Data Fields | |
| string | keywords |
| Data Fields inherited from Array< T, CpuObj > | |
| string | keywords |
Protected Attributes | |
| long | nx |
| long | ny |
| T * | p |
| Protected Attributes inherited from Array< T, CpuObj > | |
| long | nx |
| long | ny |
| T * | p |
Additional Inherited Members | |
| Public Types inherited from Array< T, CpuObj > | |
| typedef T | type |
Used for array in cpu of any other array.
| CellArray< T >::CellArray | ( | long | nxi, |
| long | nyi = 1, | ||
| T * | pi = NULL, | ||
| int | own = 1 ) |
Create a cell array.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |
| [in] | pi | Existing memory to use. Allocated if NULL. |
| [in] | own | Whether to free pi when the last reference is released. |
| CellArray< T >::CellArray | ( | long | nxi, |
| long | nyi, | ||
| const CellArray< T > & | pi, | ||
| long | offset = 0 ) |
Create a reference to part of an existing cell array with offset.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |
| [in] | pi | Cell array to reference. |
| [in] | offset | Offset in number of elements. |
| CellArray< T >::CellArray | ( | ) |
Create an empty cell array.
Transpose the cell array.
| [in] | stream | Stream to run in. |
| void CellArray< T >::Zero | ( | cudaStream_t | stream = 0 | ) |
Zero each block.
| [in] | stream | Stream to run in. |
| void CellArray< T >::Write | ( | cudaStream_t | stream, |
| file_t * | fp ) const |
Write the cell array to file.
| [in] | stream | Stream to copy in. |
| [in,out] | fp | File to write to. |
| void CellArray< T >::Write | ( | cudaStream_t | stream, |
| const char * | format, | ||
| ... ) const |
Write the cell array to a file named by format.
| [in] | stream | Stream to copy in. |
| [in] | format | printf style format of the file name, followed by arguments. |
| ( | ) |
Release the reference and free the memory if this is the last owner.
| [in] | ix | Row index. |
| [in] | iy | Column index. |
| [in] | ix | Row index. |
| [in] | iy | Column index. |
| ( | ) |
| ( | ) | const |
| ( | int | i | ) |
| [in] | i | Index. |
| ( | int | i | ) | const |
| [in] | i | Index. |
| ( | ) | const |
| [in] | icol | Column index. |
| [in] | icol | Column index. |
Reallocate the array. Existing data of the same size is kept.
| [in] | nxi | Number of rows. |
| [in] | nyi | Number of columns. |