PSCF v1.3
Pscf::Rpg::HostDArrayComplex Class Reference

HostDArray containing cudaComplex elements. More...

#include <HostDArrayComplex.h>

Inheritance diagram for Pscf::Rpg::HostDArrayComplex:
Pscf::HostDArray< Prdc::Cuda::cudaComplex > Util::DArray< Prdc::Cuda::cudaComplex > Util::Array< Prdc::Cuda::cudaComplex >

Public Types

typedef Prdc::Cuda::cudaComplex ElementType
 Type of each element.
typedef Prdc::Cuda::cudaComplex Complex
 Complex number type.
typedef Prdc::Cuda::cudaReal Real
 Type of real or imaginary part of a Complex number.
typedef HostDArray< ComplexBase
 Base class type.
Public Types inherited from Pscf::HostDArray< Prdc::Cuda::cudaComplex >
typedef Prdc::Cuda::cudaComplex ElementType
 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< Prdc::Cuda::cudaComplex >
 HostDArray ()
 Default constructor.
virtual ~HostDArray ()
 Destructor.
virtual HostDArray< Prdc::Cuda::cudaComplex > & operator= (DeviceArray< Prdc::Cuda::cudaComplex > const &other)
 Assignment operator, assign from DeviceArray<Data> device array.
void copySlice (DeviceArray< Prdc::Cuda::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< Prdc::Cuda::cudaComplex >
 DArray ()
 Default constructor.
virtual ~DArray ()
 Destructor.
DArray< Prdc::Cuda::cudaComplex > & operator= (DArray< Prdc::Cuda::cudaComplex > const &other)
 Assignment operator.
void allocate (int capacity)
 Allocate the underlying C array.
void deallocate ()
 Dellocate 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.
void serialize (Archive &ar, const unsigned int version)
 Serialize a DArray to/from an Archive.
Public Member Functions inherited from Util::Array< Prdc::Cuda::cudaComplex >
virtual ~Array ()
 Destructor.
int capacity () const
 Return allocated size.
void begin (ArrayIterator< Prdc::Cuda::cudaComplex > &iterator)
 Set an iterator to begin this Array.
Prdc::Cuda::cudaComplex & operator[] (int i)
 Get an element by non-const reference.
Prdc::Cuda::cudaComplex * cArray ()
 Return a pointer to the underlying C array.

Additional Inherited Members

Protected Member Functions inherited from Util::Array< Prdc::Cuda::cudaComplex >
 Array ()
 Default constructor.
Protected Attributes inherited from Util::Array< Prdc::Cuda::cudaComplex >
Prdc::Cuda::cudaComplex * data_
 Pointer to an array of Data elements.
int capacity_
 Allocated size of the data_ array.

Detailed Description

HostDArray containing cudaComplex elements.

Defined to add typedefs.

Definition at line 24 of file HostDArrayComplex.h.

Member Typedef Documentation

◆ ElementType

typedef Prdc::Cuda::cudaComplex Pscf::Rpg::HostDArrayComplex::ElementType

Type of each element.

Definition at line 32 of file HostDArrayComplex.h.

◆ Complex

typedef Prdc::Cuda::cudaComplex Pscf::Rpg::HostDArrayComplex::Complex

Complex number type.

Definition at line 37 of file HostDArrayComplex.h.

◆ Real

typedef Prdc::Cuda::cudaReal Pscf::Rpg::HostDArrayComplex::Real

Type of real or imaginary part of a Complex number.

Definition at line 42 of file HostDArrayComplex.h.

◆ Base

Base class type.

Definition at line 47 of file HostDArrayComplex.h.

Constructor & Destructor Documentation

◆ HostDArrayComplex() [1/3]

Pscf::Rpg::HostDArrayComplex::HostDArrayComplex ( )

Default constructor.

Definition at line 18 of file HostDArrayComplex.cu.

References Pscf::HostDArray< Prdc::Cuda::cudaComplex >::HostDArray().

Referenced by HostDArrayComplex().

◆ HostDArrayComplex() [2/3]

Pscf::Rpg::HostDArrayComplex::HostDArrayComplex ( int capacity)

Allocating constructor.

This constructor allocates memory for the array.

Parameters
capacitydesired capacity of array

Definition at line 25 of file HostDArrayComplex.cu.

References Util::Array< Prdc::Cuda::cudaComplex >::capacity(), and Pscf::HostDArray< Prdc::Cuda::cudaComplex >::HostDArray().

◆ HostDArrayComplex() [3/3]

Pscf::Rpg::HostDArrayComplex::HostDArrayComplex ( HostDArrayComplex const & other)

Copy constructor.

Perform a deep copy of all array elements.

Parameters
otherother object being copied to this one.

Definition at line 32 of file HostDArrayComplex.cu.

References Pscf::HostDArray< Prdc::Cuda::cudaComplex >::HostDArray(), and HostDArrayComplex().

◆ ~HostDArrayComplex()

Pscf::Rpg::HostDArrayComplex::~HostDArrayComplex ( )

Destructor.

Definition at line 39 of file HostDArrayComplex.cu.


The documentation for this class was generated from the following files: