28 template <
typename Data>
111 template <
typename Data>
113 {
return capacity_; }
118 template <
typename Data>
125 template <
typename Data>
132 template <
typename Data>
134 {
return (
bool)data_; }
Dynamic array on the GPU with alligned data.
virtual DField< Data > & operator=(const DField< Data > &other)
Assignment operator.
Data * cDField()
Return pointer to underlying C array.
void allocate(int capacity)
Allocate the underlying C array on the device.
int capacity_
Allocated size of the data_ array.
void deallocate()
Dellocate the underlying C array.
Data * data_
Pointer to an array of Data elements on the device / GPU.
virtual ~DField()
Destructor.
DField()
Default constructor.
const Data * cDField() const
Return pointer to const to underlying C array.
int capacity() const
Return allocated size.
bool isAllocated() const
Return true if the Field has been allocated, false otherwise.
File containing preprocessor macros for error handling.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.