|
PSCF v1.4.0
|
HostDArray containing cudaComplex elements. More...
#include <HostDArrayComplex.h>
Public Types | |
| using | ValueType = cudaComplex |
| Type of each element. | |
| using | RealType = cudaReal |
| Type of real or imaginary part of a complex number. | |
| using | Base = HostDArray<cudaComplex> |
| Base class type. | |
| Public Types inherited from Pscf::HostDArray< cudaComplex > | |
| using | ValueType |
| Data type of each element. | |
Public Member Functions | |
| HostDArrayComplex () | |
| Default constructor. | |
| HostDArrayComplex (int capacity) | |
| Allocating constructor. | |
| HostDArrayComplex (HostDArrayComplex const &other) | |
| Copy constructor. | |
| ~HostDArrayComplex () | |
| Destructor. | |
| Public Member Functions inherited from Pscf::HostDArray< cudaComplex > | |
| HostDArray () | |
| Default constructor. | |
| HostDArray (int capacity) | |
| Allocating constructor. | |
| HostDArray (DeviceArray< cudaComplex > const &other) | |
| Copy constructor (copies from device to host). | |
| virtual | ~HostDArray () |
| Destructor. | |
| HostDArray< cudaComplex > & | operator= (DeviceArray< cudaComplex > const &other) |
| Assignment operator, assign from a DeviceArray<Data>. | |
| void | copySlice (DeviceArray< cudaComplex > const &other, int beginId) |
| Copy a slice of the data from a larger DeviceArray into this array. | |
| Public Member Functions inherited from Util::DArray< Data > | |
| DArray () | |
| Default constructor. | |
| DArray (int capacity) | |
| Allocating constructor. | |
| DArray (DArray< Data > const &other) | |
| Copy constructor. | |
| virtual | ~DArray () |
| Destructor. | |
| DArray< Data > & | operator= (DArray< Data > const &other) |
| Assignment from a DArray<Data> container. | |
| DArray< Data > & | operator= (Array< Data > const &other) |
| Assignment from an Array<Data> container. | |
| void | allocate (int capacity) |
| Allocate the underlying C array. | |
| void | deallocate () |
| Deallocate the underlying C array. | |
| void | reallocate (int capacity) |
| Reallocate the underlying C array and copy to new location. | |
| bool | isAllocated () const |
| Return true if this DArray has been allocated, false otherwise. | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize a DArray to/from an Archive. | |
| Public Member Functions inherited from Util::Array< Data > | |
| int | capacity () const |
| Return allocated size. | |
| void | begin (ArrayIterator< Data > &iterator) |
| Set an iterator to begin this Array. | |
| void | begin (ConstArrayIterator< Data > &iterator) const |
| Set a const iterator to begin this Array. | |
| Data & | operator[] (int i) |
| Get an element by non-const reference. | |
| Data const & | operator[] (int i) const |
| Get an element by const reference. | |
| Data * | cArray () |
| Return a pointer to the underlying C array. | |
| Data const * | cArray () const |
| Return pointer to const to the underlying C array. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Util::Array< Data > | |
| Array () | |
| Constructor (protected to provent direct instantiation). | |
| ~Array () | |
| Destructor (protected to prevent direct destruction). | |
| Protected Attributes inherited from Util::Array< Data > | |
| Data * | data_ |
| Pointer to an array of Data elements. | |
| int | capacity_ |
| Allocated size of the data_ array. | |
HostDArray containing cudaComplex elements.
Defined to add typedefs.
Definition at line 25 of file HostDArrayComplex.h.
Type of each element.
Definition at line 35 of file HostDArrayComplex.h.
Type of real or imaginary part of a complex number.
Definition at line 40 of file HostDArrayComplex.h.
Base class type.
Definition at line 45 of file HostDArrayComplex.h.
| Pscf::Prdc::Cuda::HostDArrayComplex::HostDArrayComplex | ( | ) |
Default constructor.
Definition at line 19 of file HostDArrayComplex.cu.
References Pscf::HostDArray< cudaComplex >::HostDArray().
Referenced by HostDArrayComplex().
| Pscf::Prdc::Cuda::HostDArrayComplex::HostDArrayComplex | ( | int | capacity | ) |
Allocating constructor.
This constructor allocates memory for the array.
| capacity | desired capacity of array |
Definition at line 26 of file HostDArrayComplex.cu.
References Util::Array< Data >::capacity(), and Pscf::HostDArray< cudaComplex >::HostDArray().
| Pscf::Prdc::Cuda::HostDArrayComplex::HostDArrayComplex | ( | HostDArrayComplex const & | other | ) |
Copy constructor.
Perform a deep copy of all array elements.
| other | other object being copied to this one. |
Definition at line 33 of file HostDArrayComplex.cu.
References Pscf::HostDArray< cudaComplex >::HostDArray(), and HostDArrayComplex().
| Pscf::Prdc::Cuda::HostDArrayComplex::~HostDArrayComplex | ( | ) |
Destructor.
Definition at line 40 of file HostDArrayComplex.cu.