Blender  V2.93
util_system.h
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __UTIL_SYSTEM_H__
18 #define __UTIL_SYSTEM_H__
19 
20 #include "util/util_string.h"
21 #include "util/util_vector.h"
22 
24 
25 /* Make sure CPU groups / NUMA API is initialized. */
27 
28 /* Get total number of threads in all NUMA nodes / CPU groups. */
30 
31 /* Get width in characters of the current console output. */
33 
34 /* Get number of available nodes.
35  *
36  * This is in fact an index of last node plus one and it's not guaranteed
37  * that all nodes up to this one are available. */
39 
40 /* Returns truth if the given node is available for compute. */
42 
43 /* Get number of available processors on a given node. */
45 
46 /* Runs the current thread and its children on a specific node.
47  *
48  * Returns truth if affinity has successfully changed. */
50 
51 /* Number of processors within the current CPU group (or within active thread
52  * thread affinity). */
54 
56 int system_cpu_bits();
62 
63 size_t system_physical_ram();
64 
65 /* Start a new process of the current application with the given arguments. */
66 bool system_call_self(const vector<string> &args);
67 
69 
70 #endif /* __UTIL_SYSTEM_H__ */
OperationNode * node
#define CCL_NAMESPACE_END
size_t system_physical_ram()
bool system_cpu_support_avx2()
int system_cpu_num_active_group_processors()
int system_cpu_bits()
bool system_cpu_run_thread_on_node(int node)
CCL_NAMESPACE_BEGIN bool system_cpu_ensure_initialized()
Definition: util_system.cpp:44
int system_cpu_thread_count()
Definition: util_system.cpp:75
string system_cpu_brand_string()
int system_console_width()
bool system_cpu_support_avx()
bool system_cpu_is_numa_node_available(int node)
Definition: util_system.cpp:97
int system_cpu_num_numa_nodes()
Definition: util_system.cpp:88
int system_cpu_num_numa_node_processors(int node)
bool system_call_self(const vector< string > &args)
bool system_cpu_support_sse3()
bool system_cpu_support_sse41()
bool system_cpu_support_sse2()