PSCF v1.3.2
cuda/Reduce.h
1#ifndef PRDC_CUDA_REDUCE_H
2#define PRDC_CUDA_REDUCE_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2025, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include "types.h"
12#include <pscf/cuda/DeviceArray.h>
13
14namespace Pscf {
15namespace Prdc {
16namespace Cuda {
17
58namespace Reduce {
59
65cudaReal sum(DeviceArray<cudaReal> const & in);
66
72cudaReal max(DeviceArray<cudaReal> const & in);
73
79cudaReal maxAbs(DeviceArray<cudaReal> const & in);
80
86cudaReal min(DeviceArray<cudaReal> const & in);
87
93cudaReal minAbs(DeviceArray<cudaReal> const & in);
94
101cudaReal innerProduct(DeviceArray<cudaReal> const & a,
102 DeviceArray<cudaReal> const & b);
103
105
106} // Reduce
107} // Cuda
108} // Prdc
109} // Pscf
110#endif
double minAbs(Array< double > const &in)
Get minimum absolute magnitude of array elements .
Definition Reduce.cpp:64
double sum(Array< double > const &in)
Compute sum of array elements .
Definition Reduce.cpp:80
double maxAbs(Array< double > const &in)
Get maximum absolute magnitude of array elements .
Definition Reduce.cpp:34
double innerProduct(Array< double > const &a, Array< double > const &b)
Compute inner product of two real arrays .
Definition Reduce.cpp:94
double max(Array< double > const &in)
Get maximum of array elements .
Definition Reduce.cpp:20
double min(Array< double > const &in)
Get minimum of array elements .
Definition Reduce.cpp:50
Functions that perform parallel reductions on the GPU.
Definition Reduce.cu:17
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Definition CField.cu:12
Periodic fields and crystallography.
Definition CField.cpp:11
PSCF package top-level namespace.