1#ifndef PRDC_CUDA_R_FIELD_H
2#define PRDC_CUDA_R_FIELD_H
11#include <pscf/cuda/DeviceArray.h>
12#include <pscf/cuda/cudaTypes.h>
13#include <pscf/math/IntVec.h>
15#include <pscf/cuda/HostDArray.h>
127 template <
class Archive>
128 void serialize(Archive& ar,
const unsigned int version);
151 {
return meshDimensions_; }
157 template <
class Archive>
161 if (Archive::is_saving()) {
165 if (Archive::is_loading()) {
184 ar & meshDimensions_;
187 #ifndef PRDC_CUDA_R_FIELD_TPP
Template for dynamic array stored in host CPU memory.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Field of real values on a regular mesh, allocated on a GPU device.
RField()
Default constructor.
void associate(DeviceArray< cudaReal > &arr, int beginId, IntVec< D > const &meshDimensions)
Associate this object with a slice of another DeviceArray.
void serialize(Archive &ar, const unsigned int version)
Serialize a Field to/from an Archive.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for data on a regular mesh.
RField< D > & operator=(const RField< D > &other)
Assignment operator, assignment from another RField<D>.
IntVec< D > const & meshDimensions() const
Return mesh dimensions by constant reference.
virtual ~RField()
Destructor.
File containing preprocessor macros for error handling.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA).
Periodic fields and crystallography.
PSCF package top-level namespace.
cufftDoubleReal cudaReal
Real number type used in CPU code that uses FFTW.