1#ifndef PRDC_CPU_FFTW_D_ARRAY_H
2#define PRDC_CPU_FFTW_D_ARRAY_H
11#include <util/containers/Array.h>
31 template <
typename Data>
81 template <
class Archive>
82 void serialize(Archive& ar,
const unsigned int version);
106 template <
typename Data>
108 {
return (
bool)
data_; }
113 template <
typename Data>
114 template <
class Archive>
118 if (Archive::is_saving()) {
122 if (Archive::is_loading()) {
129 UTIL_THROW(
"Inconsistent FftwDArray capacities");
143#include "FftwDArray.tpp"
void serialize(Archive &ar, const unsigned int version)
Serialize a FftwDArray to/from an Archive.
void allocate(int capacity)
Allocate the underlying C array.
virtual ~FftwDArray()
Destructor.
FftwDArray()
Default constructor.
virtual void deallocate()
Dellocate the underlying C array.
Data ValueType
Data type of each array element.
bool isAllocated() const
Return true if the FftwDArray has been allocated, false otherwise.
Data * data_
Pointer to an array of Data elements.
int capacity() const
Return allocated size.
int capacity_
Allocated size of the data_ array.
File containing preprocessor macros for error handling.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
PSCF package top-level namespace.