Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
global_control.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2020 Intel Corporation
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 __TBB_global_control_H
18 #define __TBB_global_control_H
19 
20 #include "tbb_stddef.h"
21 
22 namespace tbb {
23 namespace interface9 {
24 
26 public:
27  enum parameter {
30  parameter_max // insert new parameters above this point
31  };
32 
34  my_value(value), my_next(NULL), my_param(p) {
35  __TBB_ASSERT(my_param < parameter_max, "Invalid parameter");
36 #if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)
37  // For Windows 8 Store* apps it's impossible to set stack size
38  if (p==thread_stack_size)
39  return;
40 #elif __TBB_x86_64 && (_WIN32 || _WIN64)
41  if (p==thread_stack_size)
42  __TBB_ASSERT_RELEASE((unsigned)value == value, "Stack size is limited to unsigned int range");
43 #endif
45  __TBB_ASSERT_RELEASE(my_value>0, "max_allowed_parallelism cannot be 0.");
47  }
48 
50  __TBB_ASSERT(my_param < parameter_max, "Invalid parameter. Probably the object was corrupted.");
51 #if __TBB_WIN8UI_SUPPORT && (_WIN32_WINNT < 0x0A00)
52  // For Windows 8 Store* apps it's impossible to set stack size
54  return;
55 #endif
57  }
58 
59  static size_t active_value(parameter p) {
60  __TBB_ASSERT(p < parameter_max, "Invalid parameter");
61  return active_value((int)p);
62  }
63 private:
64  size_t my_value;
67 
70  static size_t __TBB_EXPORTED_FUNC active_value(int param);
71 };
72 } // namespace interface9
73 
75 
76 } // tbb
77 
78 #endif // __TBB_global_control_H
#define __TBB_ASSERT_RELEASE(predicate, message)
Definition: tbb_stddef.h:134
static size_t active_value(parameter p)
void const char const char int ITT_FORMAT __itt_group_sync p
#define __TBB_EXPORTED_FUNC
global_control(parameter p, size_t value)
#define __TBB_EXPORTED_METHOD
Definition: tbb_stddef.h:98
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
void __TBB_EXPORTED_METHOD internal_destroy()
Definition: tbb_main.cpp:539
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
The graph class.
void __TBB_EXPORTED_METHOD internal_create()
Definition: tbb_main.cpp:523

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.