|
PSCF v1.4.0
|
Dynamic array on the GPU device with aligned data. More...
#include <DeviceArray.h>
Public Types | |
| typedef Data | ValueType |
| Data type of each element. | |
Public Member Functions | |
| DeviceArray () | |
| Default constructor. | |
| DeviceArray (int capacity) | |
| Allocating constructor. | |
| DeviceArray (DeviceArray< Data > const &other) | |
| Copy constructor. | |
| DeviceArray (DArray< Data > const &other) | |
| Copy constructor, deep copy DArray<Data> from host to device. | |
| virtual | ~DeviceArray () |
| Destructor. | |
| void | allocate (int capacity) |
| Allocate the underlying C array on the device. | |
| void | deallocate () |
| Dellocate the underlying C array. | |
| void | associate (DeviceArray< Data > &arr, int beginId, int capacity) |
| Associate this object with a slice of a different DeviceArray. | |
| void | associate (DeviceMemory &arr, int capacity) |
| Associate this object with a DeviceMemory container. | |
| void | dissociate () |
| Dissociate this object from an externally owned memory block. | |
| void | addReference (CountedReference &reference) |
| Associate a reference with reference counter for this container. | |
| virtual DeviceArray< Data > & | operator= (const DeviceArray< Data > &other) |
| Assignment operator, assign from another DeviceArray<Data> array. | |
| virtual DeviceArray< Data > & | operator= (const DArray< Data > &other) |
| Assignment operator, assignment from Util::DArray<Data> host array. | |
| int | capacity () const |
| Return array capacity. | |
| bool | isAllocated () const |
| Return true if the array has allocated data, false otherwise. | |
| bool | isOwner () const |
| Does this container own an allocated memory block? | |
| bool | isAssociated () const |
| Is this container associated with a memory block it does not own? | |
| Data * | cArray () |
| Return pointer to underlying C array. | |
| Data const * | cArray () const |
| Return const pointer to underlying C array. | |
Protected Attributes | |
| Data * | dataPtr_ |
| Pointer to a C array of Data elements on the GPU device. | |
| int | capacity_ |
| Allocated size (capacity) of the array. | |
| ReferenceCounter | refCounter_ |
| Counter for any arrays that use data owned by this. | |
| CountedReference | ref_ |
| Reference to another array that owns memory used by this one. | |
Dynamic array on the GPU device with aligned data.
This class wraps an aligned C array with elements of type Data that is allocated in GPU device global memory. All member functions may be called from the CPU host, but this class does not offer access to individual elements via the subscript operator, operator[].
A DeviceArray can be in any of three states:
(1) Unallocated: In this state, there is no associated memory, so capacity() returns 0, while isAllocated(), isOwner() and isAssociated() all return false.
(2) A data owner: In this case, this object owns a block of memory that it is responsible for de-allocating. In this state, capacity() returns a positive integer value, isAllocated() and isOwner() return true, and isAssociated() returns false.
(3) A data user: In this case, this object has a pointer to a block of device memory that is owned by a different container. We describe this by saying this DeviceArray (the data user) is "associated" with or "references" memory owned by another container (the data owner). In this state, capacity() returns a positive value, isAllocated() and isAssociated() return true, and isOwner() returns false.
Memory that is owned by a DeviceArray may be allocated and deallocated by the allocate() and deallocate() member functions. Memory owned by a DeviceArray is also dellocated when the DeviceArray is destroyed.
A DeviceArray<Data> object may be associated as a data user with:
Associations with either type of data owner can be created and destroyed by calling the associate and dissociate member functions of the data user. Attempts to create an association cause an Exception to be thrown if the requested slice of shared data would exceed the bounds of the block owned by the data owner.
A DeviceArray<Data> that serves as an owner of data that is used by one or more other associated DeviceArray<Data> objects maintains a count of how many associated objects refer to its data. This counter is incremented when an association is created by a data user and decremented when the user destroys the association.
When a DeviceArray<Data> object is destroyed, any data that it owns is automatically deallocated, and any association with external data is destroyed.
It is an error to deallocate memory owned by a DeviceArray or DeviceMemory container that is still referred to by one or more associated DeviceArray data users. Doing so is illegal because it creates dangling pointers. Attempts to prematurely deallocate such a shared memory block either cause an Exception to be thrown, if it occurs within the deallocate function, or cause an error message to be written to std::cout if the error occurs in the DeviceArray destructor function. All references to such a shared data block must thus be released, by calling the dissociate() member function of each data user, before the data owner can be safely destroyed.
Definition at line 95 of file DeviceArray.h.
| typedef Data Pscf::DeviceArray< Data >::ValueType |
Data type of each element.
Definition at line 103 of file DeviceArray.h.
| Pscf::DeviceArray< Data >::DeviceArray | ( | ) |
Default constructor.
Definition at line 346 of file DeviceArray.h.
References capacity_, and dataPtr_.
Referenced by associate(), DeviceArray(), and operator=().
| Pscf::DeviceArray< Data >::DeviceArray | ( | int | capacity | ) |
Allocating constructor.
This function calls allocate(capacity) internally.
| capacity | number of elements to allocate |
Definition at line 355 of file DeviceArray.h.
References allocate(), capacity(), capacity_, and dataPtr_.
| Pscf::DeviceArray< Data >::DeviceArray | ( | DeviceArray< Data > const & | other | ) |
Copy constructor.
| other | DeviceArray<Data> to be copied (input) |
Definition at line 366 of file DeviceArray.h.
References allocate(), capacity_, cArray(), dataPtr_, DeviceArray(), and isAllocated().
| Pscf::DeviceArray< Data >::DeviceArray | ( | DArray< Data > const & | other | ) |
Copy constructor, deep copy DArray<Data> from host to device.
| other | DArray<Data> to be copied (input) |
Definition at line 386 of file DeviceArray.h.
References allocate(), Util::Array< Data >::capacity(), capacity_, Util::Array< Data >::cArray(), dataPtr_, and Util::DArray< Data >::isAllocated().
|
virtual |
Destructor.
Deletes underlying C array, if allocated previously.
Definition at line 404 of file DeviceArray.h.
References dataPtr_, isOwner(), ref_, and refCounter_.
| void Pscf::DeviceArray< Data >::allocate | ( | int | capacity | ) |
Allocate the underlying C array on the device.
| Exception | if the array is already allocated. |
| capacity | number of elements to allocate. |
Definition at line 424 of file DeviceArray.h.
References capacity(), capacity_, dataPtr_, isAllocated(), ref_, and UTIL_THROW.
Referenced by Pscf::Prdc::Cuda::CField< D >::allocate(), Pscf::Prdc::Cuda::RField< D >::allocate(), Pscf::Prdc::Cuda::RFieldDft< D >::allocate(), DeviceArray(), DeviceArray(), DeviceArray(), operator=(), and operator=().
| void Pscf::DeviceArray< Data >::deallocate | ( | ) |
Dellocate the underlying C array.
Definition at line 445 of file DeviceArray.h.
References capacity_, dataPtr_, ref_, refCounter_, and UTIL_CHECK.
| void Pscf::DeviceArray< Data >::associate | ( | DeviceArray< Data > & | arr, |
| int | beginId, | ||
| int | capacity ) |
Associate this object with a slice of a different DeviceArray.
| Exception | if the array is already allocated. |
| arr | parent array that owns the data |
| beginId | index in the parent array at which this array starts |
| capacity | number of elements associated with this container |
Definition at line 459 of file DeviceArray.h.
References addReference(), capacity(), capacity_, cArray(), dataPtr_, DeviceArray(), isAllocated(), isOwner(), ref_, and UTIL_CHECK.
Referenced by Pscf::Prdc::Cuda::CField< D >::associate(), Pscf::Prdc::Cuda::RField< D >::associate(), Pscf::Prdc::Cuda::RFieldDft< D >::associate(), Pscf::Reduce::innerProduct(), Pscf::Reduce::maxAbs(), Pscf::Reduce::minAbs(), Pscf::Reduce::sumSq(), Pscf::Reduce::sumSq(), and Pscf::Reduce::sumSqAbs().
| void Pscf::DeviceArray< Data >::associate | ( | DeviceMemory & | arr, |
| int | capacity ) |
Associate this object with a DeviceMemory container.
When a DeviceArray<Data> is associated with a DeviceMemory container, the shared data block begins at the first byte of the block owned by the DeviceMemory. The number of byes in such a shared block is equal to capacity * sizeof(Data). This must be less than or equal to the number of byes in the block owned by the DeviceMemory, or this function will throw an Exception.
| Exception | if the array is already allocated |
| Exception | if the requested memory block is too large |
| arr | DeviceMemory container that owns the data |
| capacity | number of elements of type Data |
Definition at line 482 of file DeviceArray.h.
References Pscf::DeviceMemory::addReference(), capacity(), Pscf::DeviceMemory::capacity(), capacity_, Pscf::DeviceMemory::cArray(), dataPtr_, Pscf::DeviceMemory::isAllocated(), ref_, and UTIL_CHECK.
| void Pscf::DeviceArray< Data >::dissociate | ( | ) |
Dissociate this object from an externally owned memory block.
This function can destroy an association with either another DeviceArray or with a DeviceMemory. After successful exit, isAllocated() and isAssociated() will both return false.
| Exception | if this is not associated with external memory |
Definition at line 502 of file DeviceArray.h.
References capacity_, dataPtr_, ref_, and UTIL_CHECK.
Referenced by Pscf::Reduce::innerProduct(), Pscf::Reduce::maxAbs(), Pscf::Reduce::minAbs(), Pscf::Rpg::Block< D >::stepThread(), Pscf::Reduce::sumSq(), Pscf::Reduce::sumSq(), and Pscf::Reduce::sumSqAbs().
| void Pscf::DeviceArray< Data >::addReference | ( | CountedReference & | reference | ) |
Associate a reference with reference counter for this container.
This function should normally only be called within the associate member function of a container that is referring to data owned by this array, as part of the process of creating an association. It should not be called by users in any other context.
On exit, the ReferenceCounter owned by this DeviceMemory is incremented by one and the CountedReference contains a pointer to the ReferenceCounter. This pointer can later be used as part of the process of destroying the association.
| reference | reference to be included by reference counter |
Definition at line 520 of file DeviceArray.h.
References Util::CountedReference::associate(), and refCounter_.
Referenced by associate().
|
virtual |
Assignment operator, assign from another DeviceArray<Data> array.
Performs a deep copy, by copying values of all elements from device memory to device memory.
This function will allocate memory if this (LHS) array is not allocated. If this array is arleady allocated, it must have the same capacity as the other (RHS) DeviceArray<Data>.
| other | DeviceArray<Data> on rhs of assignent (input) |
Definition at line 528 of file DeviceArray.h.
References allocate(), capacity(), capacity_, cArray(), dataPtr_, DeviceArray(), isAllocated(), and UTIL_THROW.
Referenced by Pscf::Prdc::Cuda::CField< D >::operator=(), Pscf::Prdc::Cuda::CField< D >::operator=(), Pscf::Prdc::Cuda::RField< D >::operator=(), Pscf::Prdc::Cuda::RField< D >::operator=(), Pscf::Prdc::Cuda::RFieldDft< D >::operator=(), and Pscf::Prdc::Cuda::RFieldDft< D >::operator=().
|
virtual |
Assignment operator, assignment from Util::DArray<Data> host array.
Performs a deep copy from a RHS DArray<Data> host array to this LHS DeviceArray<Data>, by copying underlying C array from host memory to device memory.
If this (LHS) DeviceArray<Data> is not allocated on entry, required memory will be allocated before data is copied. If this LHS object is already allocated, it must have the same capacity as the RHS DArray<Data>.
| other | DArray<Data> on RHS of assignent (input) |
Definition at line 561 of file DeviceArray.h.
References allocate(), Util::Array< Data >::capacity(), capacity_, Util::Array< Data >::cArray(), dataPtr_, isAllocated(), Util::DArray< Data >::isAllocated(), and UTIL_THROW.
|
inline |
Return array capacity.
Definition at line 308 of file DeviceArray.h.
References capacity_.
Referenced by Pscf::VecOp::absV(), Pscf::VecOp::absV(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqVc(), Pscf::VecOp::addVcS(), Pscf::VecOp::addVcVc(), Pscf::VecOp::addVcVcS(), Pscf::VecOp::addVcVcVc(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), allocate(), associate(), associate(), Pscf::Prdc::Cuda::CFieldComparison< D >::compare(), Pscf::Prdc::Cuda::RFieldComparison< D >::compare(), Pscf::Prdc::Cuda::RFieldComparison< D >::compare(), Pscf::Prdc::Cuda::RFieldDftComparison< D >::compare(), Pscf::Prdc::Cuda::WaveList< D >::computedKSq(), Pscf::Rpg::IntraCorrelation< D >::computeOmegaTotal(), Pscf::Rpg::FieldIo< D >::convertBasisToKGrid(), Pscf::Rpg::FieldIo< D >::convertKGridToBasis(), Pscf::HostDArray< Data >::copySlice(), DeviceArray(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqVc(), Pscf::VecOp::divSV(), Pscf::VecOp::divSV(), Pscf::VecOp::divVS(), Pscf::VecOp::divVS(), Pscf::VecOp::divVS(), Pscf::VecOp::divVS(), Pscf::VecOp::divVV(), Pscf::VecOp::divVV(), Pscf::VecOp::divVV(), Pscf::VecOp::divVV(), Pscf::VecOp::eqS(), Pscf::VecOp::eqS(), Pscf::VecOp::eqS(), Pscf::VecOp::eqS(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqVPair(), Pscf::VecOp::expV(), Pscf::VecOp::expV(), Pscf::VecOp::expV(), Pscf::VecOp::expV(), Pscf::VecOp::expVc(), Pscf::Prdc::Cuda::FFT< D >::forwardTransform(), Pscf::Prdc::Cuda::FFT< D >::forwardTransform(), Pscf::Prdc::Cuda::FFTBatched< D >::forwardTransform(), Pscf::Rpg::FieldIo< D >::hasSymmetry(), Pscf::HostDArray< Data >::HostDArray(), Pscf::Reduce::innerProduct(), Pscf::Prdc::Cuda::FFT< D >::inverseTransform(), Pscf::Prdc::Cuda::FFT< D >::inverseTransformUnsafe(), Pscf::Prdc::Cuda::FFTBatched< D >::inverseTransformUnsafe(), Pscf::Reduce::max(), Pscf::Reduce::max(), Pscf::Reduce::maxAbs(), Pscf::Reduce::min(), Pscf::Reduce::min(), Pscf::Reduce::minAbs(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqVPair(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVVPair(), Pscf::CudaVecRandom::normal(), Pscf::CudaVecRandom::normal(), operator=(), Pscf::HostDArray< Data >::operator=(), Pscf::VecOp::sqAbsV(), Pscf::VecOp::sqAbsV(), Pscf::VecOp::sqSqAbsV(), Pscf::VecOp::sqV(), Pscf::VecOp::sqV(), Pscf::VecOp::sqV(), Pscf::VecOp::sqV(), Pscf::Rpg::Block< D >::stepBondBead(), Pscf::Rpg::Block< D >::stepFieldBead(), Pscf::Rpg::Block< D >::stepHalfBondBead(), Pscf::Rpg::FilmFieldGenMask< D >::stress(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sumSq(), Pscf::Reduce::sumSq(), Pscf::Reduce::sumSqAbs(), Pscf::CudaVecRandom::uniform(), Pscf::CudaVecRandom::uniform(), and Pscf::Rpg::FieldIo< D >::writeFieldRGrid().
|
inline |
Return true if the array has allocated data, false otherwise.
A DeviceArray is considered allocated if it has non-null pointer to an data block, which may either be a block that it owns or a block owned by another container.
Definition at line 315 of file DeviceArray.h.
References dataPtr_.
Referenced by allocate(), associate(), Pscf::Rpg::FieldIo< D >::convertBasisToKGrid(), Pscf::Rpg::FieldIo< D >::convertKGridToBasis(), Pscf::HostDArray< Data >::copySlice(), DeviceArray(), Pscf::Rpg::FieldIo< D >::hasSymmetry(), Pscf::HostDArray< Data >::HostDArray(), Pscf::Reduce::innerProduct(), Pscf::Reduce::max(), Pscf::Reduce::max(), Pscf::Reduce::maxAbs(), Pscf::Reduce::min(), Pscf::Reduce::min(), Pscf::Reduce::minAbs(), operator=(), operator=(), Pscf::HostDArray< Data >::operator=(), Pscf::Rpg::FieldIo< D >::scaleFieldRGrid(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sumSq(), Pscf::Reduce::sumSq(), and Pscf::Reduce::sumSqAbs().
|
inline |
Does this container own an allocated memory block?
If isAllocated() is false, isOwner() must be false.
Definition at line 322 of file DeviceArray.h.
References dataPtr_, and ref_.
Referenced by associate(), and ~DeviceArray().
|
inline |
Is this container associated with a memory block it does not own?
If isAllocated() is false, isAssociated() must be false.
Definition at line 329 of file DeviceArray.h.
| Data * Pscf::DeviceArray< Data >::cArray | ( | ) |
Return pointer to underlying C array.
Definition at line 590 of file DeviceArray.h.
References dataPtr_, and UTIL_CHECK.
Referenced by Pscf::VecOp::absV(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqS(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqV(), Pscf::VecOp::addEqVc(), Pscf::VecOp::addVcS(), Pscf::VecOp::addVcVc(), Pscf::VecOp::addVcVcS(), Pscf::VecOp::addVcVcVc(), Pscf::VecOp::addVMany(), Pscf::VecOp::addVMany(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVS(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), Pscf::VecOp::addVV(), associate(), Pscf::Rpg::FilmFieldGenExt< D >::compute(), Pscf::Rpg::FilmFieldGenMask< D >::compute(), Pscf::Prdc::Cuda::WaveList< D >::computedKSq(), Pscf::Prdc::Cuda::WaveList< D >::computeKSq(), Pscf::Prdc::Cuda::WaveList< D >::computeMinimumImages(), Pscf::HostDArray< Data >::copySlice(), DeviceArray(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqS(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqV(), Pscf::VecOp::divEqVc(), Pscf::VecOp::divSV(), Pscf::VecOp::divVS(), Pscf::VecOp::divVS(), Pscf::VecOp::divVV(), Pscf::VecOp::divVV(), Pscf::VecOp::eqS(), Pscf::VecOp::eqS(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqV(), Pscf::VecOp::eqVPair(), Pscf::VecOp::expV(), Pscf::VecOp::expV(), Pscf::VecOp::expVc(), Pscf::Prdc::Cuda::FFT< D >::forwardTransform(), Pscf::Prdc::Cuda::FFT< D >::forwardTransform(), Pscf::Prdc::Cuda::FFTBatched< D >::forwardTransform(), Pscf::HostDArray< Data >::HostDArray(), Pscf::Prdc::Cuda::FFT< D >::inverseTransform(), Pscf::Prdc::Cuda::FFT< D >::inverseTransformUnsafe(), Pscf::Prdc::Cuda::FFTBatched< D >::inverseTransformUnsafe(), Pscf::Reduce::max(), Pscf::Reduce::max(), Pscf::Reduce::min(), Pscf::Reduce::min(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqS(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqV(), Pscf::VecOp::mulEqVPair(), Pscf::VecOp::mulVMany(), Pscf::VecOp::mulVMany(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVS(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVV(), Pscf::VecOp::mulVVPair(), Pscf::CudaVecRandom::normal(), Pscf::CudaVecRandom::normal(), operator=(), Pscf::HostDArray< Data >::operator=(), Pscf::VecOp::sqAbsV(), Pscf::VecOp::sqSqAbsV(), Pscf::VecOp::sqV(), Pscf::VecOp::sqV(), Pscf::Rpg::FilmFieldGenExt< D >::stress(), Pscf::Rpg::FilmFieldGenMask< D >::stress(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqS(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subEqV(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVS(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::VecOp::subVV(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::Reduce::sum(), Pscf::CudaVecRandom::uniform(), and Pscf::CudaVecRandom::uniform().
| const Data * Pscf::DeviceArray< Data >::cArray | ( | ) | const |
Return const pointer to underlying C array.
Definition at line 600 of file DeviceArray.h.
References dataPtr_, and UTIL_CHECK.
|
protected |
Pointer to a C array of Data elements on the GPU device.
Definition at line 289 of file DeviceArray.h.
Referenced by allocate(), associate(), associate(), cArray(), cArray(), deallocate(), DeviceArray(), DeviceArray(), DeviceArray(), DeviceArray(), dissociate(), isAllocated(), isAssociated(), isOwner(), operator=(), operator=(), and ~DeviceArray().
|
protected |
Allocated size (capacity) of the array.
Definition at line 292 of file DeviceArray.h.
Referenced by allocate(), associate(), associate(), capacity(), deallocate(), DeviceArray(), DeviceArray(), DeviceArray(), DeviceArray(), dissociate(), operator=(), and operator=().
|
protected |
Counter for any arrays that use data owned by this.
Definition at line 295 of file DeviceArray.h.
Referenced by addReference(), deallocate(), and ~DeviceArray().
|
protected |
Reference to another array that owns memory used by this one.
Definition at line 298 of file DeviceArray.h.
Referenced by allocate(), associate(), associate(), deallocate(), dissociate(), isAssociated(), isOwner(), and ~DeviceArray().