PSCF v1.5.0
CUT.h
1#ifndef PSCF_CUT_H
2#define PSCF_CUT_H
3
4/*
5* PSCF - Polymer Self-Consistent Field
6*
7* Copyright 2015 - 2026, David Morse (morse012@um.edu) and co-authors
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/backend/BackendId.h>
12#include <pscf/backend/cuda/cudaTypes.h>
13
14// Forward declarations
15namespace Util {
16 class Random;
17}
18namespace Pscf {
19 template <typename T> class VecRandom;
20}
21
22namespace Pscf {
23
24 using namespace Util;
25
31 class CUT {
32
33 public:
34
35 // Type aliases
36
37 using Real = cudaReal;
38 using Complex = cudaComplex;
39
40 // Static members
41
45 static const BackendId id = BackendId::Cpp;
46
50 static void init();
51
57 static void setThreadCount(int nThread);
58
59 };
60
61} // namespace Pscf
62#endif
Backend identifier class for the GPU-enabled CUDA backend.
Definition CUT.h:31
static void init()
Initialize backend thread array.
Definition CUT.cu:20
static void setThreadCount(int nThread)
Set the number of threads per block.
Definition CUT.cu:26
Random number generator.
Definition Random.h:47
PSCF package top-level namespace.
cufftDoubleComplex cudaComplex
Complex number type used in CPU code that uses FFTW.
Definition cudaTypes.h:22
cufftDoubleReal cudaReal
Real number type used in CPU code that uses FFTW.
Definition cudaTypes.h:35
BackendId
Enum that identifies a computational "backend".
Definition BackendId.h:25
Utility classes for scientific computation.