Advanced Multi-Physics (AMP)
On-Line Documentation
ThreadHelpers.h
Go to the documentation of this file.
1#ifndef included_AMP_ThreadPool_ThreadHelpers
2#define included_AMP_ThreadPool_ThreadHelpers
3
4
5#include <thread>
6#include <vector>
7
8
9namespace AMP::Thread {
10
11
14
15
18
19
21std::thread::native_handle_type getCurrentThread();
22
23
25std::vector<int> getProcessAffinity();
26
27
29void setProcessAffinity( const std::vector<int> &procs );
30
31
36std::vector<int> getThreadAffinity( std::thread::native_handle_type thread );
37
38
44void setThreadAffinity( std::thread::native_handle_type thread, const std::vector<int> &procs );
45
46
47} // namespace AMP::Thread
48
49#endif
std::vector< int > getProcessAffinity()
Function to return the affinity of the current process.
void setProcessAffinity(const std::vector< int > &procs)
Function to set the affinity of the current process.
void setThreadAffinity(std::thread::native_handle_type thread, const std::vector< int > &procs)
int getNumberOfProcessors()
Function to return the number of processors available.
std::thread::native_handle_type getCurrentThread()
Return the native handle to the current thread.
int getCurrentProcessor()
Function to return the processor number that the current thread is running on.
std::vector< int > getThreadAffinity(std::thread::native_handle_type thread)



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:41.
Comments on this page