1#ifndef PRDC_FIELD_ARRAY_UTIL_H 
    2#define PRDC_FIELD_ARRAY_UTIL_H 
   11#include <prdc/cuda/types.h> 
   12#include <pscf/math/IntVec.h> 
   20   void allocateArrays(
DArray<AT>& arrays, 
int n, 
int capacity)
 
   24      for (
int i = 0; i < n; ++i) {
 
   29   template <
int D, 
class FT>
 
   34      for (
int i = 0; i < n; ++i) {
 
   39   template <
class OAT, 
class IAT>
 
   44      for (
int i = 0; i < n; ++i) {
 
   47    UTIL_CHECK(in[i].capacity() == out[i].capacity());
 
An IntVec<D, T> is a D-component vector of elements of integer type T.
 
int capacity() const
Return allocated size.
 
Dynamically allocatable contiguous array template.
 
void allocate(int capacity)
Allocate the underlying C array.
 
bool isAllocated() const
Return true if this DArray has been allocated, false otherwise.
 
File containing preprocessor macros for error handling.
 
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
 
PSCF package top-level namespace.