1#ifndef PSCF_R_FIELD_CU_H
2#define PSCF_R_FIELD_CU_H
11#include <pscf/backend/cuda/CUT.h>
12#include <pscf/backend/cuda/BackendArray.h>
13#include <pscf/backend/cuda/cudaTypes.h>
14#include <pscf/math/IntVec.h>
19 template <
int D,
class T>
class RField;
136 template <
class Archive>
137 void serialize(Archive& ar,
const unsigned int version);
162#include <pscf/backend/cuda/HostSendArray.h>
171 template <
int D>
inline
174 {
return meshDimensions_; }
180 template <
class Archive>
184 if (Archive::is_saving()) {
185 capacity = capacity_;
188 if (Archive::is_loading()) {
189 if (!isAllocated()) {
194 if (capacity != capacity_) {
203 for (
int i = 0; i < capacity_; ++i) {
207 ar & meshDimensions_;
Backend identifier class for the GPU-enabled CUDA backend.
An IntVec<D, T> is a D-component vector of elements of integer type T.
RField()
Default constructor.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying array for data on a regular mesh.
void serialize(Archive &ar, const unsigned int version)
Serialize a Field to/from an Archive.
void deallocate()
Deallocate the underlying array.
void associate(BackendArray< cudaReal, CUT > &arr, int beginId, IntVec< D > const &meshDimensions)
Associate this object with a slice of another BackendArray.
IntVec< D > const & meshDimensions() const
Return mesh dimensions by constant reference.
File containing preprocessor macros for error handling.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
PSCF package top-level namespace.
cufftDoubleReal cudaReal
Real number type used in CPU code that uses FFTW.