1#ifndef PSCF_CUDA_REDUCE_H
2#define PSCF_CUDA_REDUCE_H
11#include <pscf/cuda/cudaTypes.h>
12#include <pscf/cuda/DeviceArray.h>
76 cudaReal sum(DeviceArray<cudaReal>
const & in,
int begin,
int end);
86 std::complex<cudaReal>
sum(DeviceArray<cudaComplex>
const & in);
98 std::complex<cudaReal>
sum(DeviceArray<cudaComplex>
const & in,
127 std::complex<cudaReal>
sumSq(DeviceArray<cudaComplex>
const & in);
153 DeviceArray<cudaReal>
const & b);
177 cudaReal max(DeviceArray<cudaReal>
const & in,
int begin,
int end);
211 cudaReal min(DeviceArray<cudaReal>
const & in,
int begin,
int end);
double minAbs(Array< double > const &in)
Get minimum absolute magnitude of array elements .
double min(Array< double > const &in)
Get minimum of array elements .
double innerProduct(Array< double > const &a, Array< double > const &b)
Compute Euclidean inner product of two real arrays .
double maxAbs(Array< double > const &in)
Get maximum absolute magnitude of array elements .
double sumSq(Array< double > const &in)
Compute sum of of squares of array elements (real).
double sum(Array< double > const &in)
Compute sum of array elements (real).
double max(Array< double > const &in)
Get maximum of array elements (real).
cudaReal sumSqAbs(DeviceArray< cudaComplex > const &in)
Return sum of squared magnitudes of elements of a complex array.
void freeWorkSpace()
Free any private work space currently allocated for reductions.
Reduction operations performed on a CPU or GPU.
PSCF package top-level namespace.
cufftDoubleReal cudaReal
Real number type used in CPU code that uses FFTW.