PSCF v1.4.0
ThreadArray.h
1#ifndef PSCF_THREAD_ARRAY_H
2#define PSCF_THREAD_ARRAY_H
3
4#include <util/global.h>
5
6namespace Pscf {
7
11namespace ThreadArray {
12
20
24 void init();
25
31 void setThreadsPerBlock();
32
38 void setThreadsPerBlock(int nThreadsPerBlock);
39
50
64
80
88
89 // Accessors
90
94 int nBlocks();
95
99 int nThreads();
100
104 int nThreadsLogical();
105
109 int warpSize();
110
116 bool hasUnusedThreads();
117
119
120} // namespace ThreadArray
121} // namespace Pscf
122#endif
File containing preprocessor macros for error handling.
void checkExecutionConfig()
Check the execution configuration (threads and block counts).
int warpSize()
Get the warp size.
void init()
Initialize static variables in Pscf::ThreadArray namespace.
void setThreadsLogical(int nThreadsLogical)
Given total number of threads, set 1D execution configuration.
int nThreads()
Get the number of threads per block for execution.
int nThreadsLogical()
Return previously requested total number of threads.
bool hasUnusedThreads()
Indicates whether there will be unused threads.
void setThreadsPerBlock()
Set the number of threads per block to a default value.
int nBlocks()
Get the current number of blocks for execution.
Global functions and variables to control GPU thread and block counts.
PSCF package top-level namespace.