1#ifndef PRDC_CUDA_C_FIELD_H
2#define PRDC_CUDA_C_FIELD_H
11#include <pscf/cuda/cudaTypes.h>
12#include <pscf/cuda/DeviceArray.h>
13#include <pscf/cuda/HostDArray.h>
14#include <pscf/math/IntVec.h>
125 template <
class Archive>
126 void serialize(Archive& ar,
const unsigned int version);
149 {
return meshDimensions_; }
155 template <
class Archive>
159 if (Archive::is_saving()) {
163 if (Archive::is_loading()) {
183 ar & meshDimensions_;
186 #ifndef PRDC_CUDA_C_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 complex values on a regular mesh, allocated on a GPU device.
CField< D > & operator=(CField< D > const &other)
Assignment operator, assignment from another CField<D>.
void associate(DeviceArray< cudaComplex > &arr, int beginId, IntVec< D > const &meshDimensions)
Associate this object with a slice of another DeviceArray.
IntVec< D > const & meshDimensions() const
Return mesh dimensions by constant reference.
void serialize(Archive &ar, const unsigned int version)
Serialize a Field to/from an Archive.
CField()
Default constructor.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for data on a regular mesh.
virtual ~CField()
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.
cufftDoubleComplex cudaComplex
Complex number type used in CPU code that uses FFTW.