├── examples
├── common
│ ├── gui
│ │ ├── xcode
│ │ │ └── tbbExample
│ │ │ │ ├── PkgInfo
│ │ │ │ ├── en.lproj
│ │ │ │ ├── InfoPlist.strings
│ │ │ │ └── MainMenu.nib
│ │ │ │ ├── tbbExample-Prefix.pch
│ │ │ │ ├── tbbAppDelegate.h
│ │ │ │ ├── tbbExample-Info.ios.plist
│ │ │ │ ├── OpenGLView.h
│ │ │ │ ├── main.m
│ │ │ │ ├── tbbExample-Info.plist
│ │ │ │ ├── iOS.storyboard
│ │ │ │ └── tbbAppDelegate.m
│ │ └── dxcheck.bat
│ ├── toolset.props
│ └── examples-common.inc
├── task_arena
│ └── fractal
│ │ └── msvs
│ │ ├── gui.ico
│ │ ├── small.ico
│ │ └── resource.h
├── parallel_for
│ ├── tachyon
│ │ └── msvs
│ │ │ ├── gui.ico
│ │ │ ├── small.ico
│ │ │ ├── win8ui
│ │ │ ├── Assets
│ │ │ │ ├── Logo.png
│ │ │ │ ├── SmallLogo.png
│ │ │ │ ├── StoreLogo.png
│ │ │ │ └── SplashScreen.png
│ │ │ ├── App.xaml
│ │ │ ├── pch.h
│ │ │ ├── App.xaml.h
│ │ │ ├── Package.appxmanifest
│ │ │ ├── tbbTachyonRenderer.h
│ │ │ ├── DirectXPage.xaml.h
│ │ │ └── App.xaml.cpp
│ │ │ └── resource.h
│ ├── seismic
│ │ ├── msvs
│ │ │ ├── small.ico
│ │ │ └── SeismicSimulation.ico
│ │ └── seismic_video.h
│ ├── game_of_life
│ │ ├── msvs
│ │ │ ├── app.ico
│ │ │ ├── resource.h
│ │ │ └── app.rc
│ │ ├── Makefile
│ │ └── Makefile.windows
│ └── polygon_overlay
│ │ ├── speedup.gif
│ │ ├── msvs
│ │ ├── resource.h
│ │ └── pover.rc
│ │ ├── polymain.h
│ │ └── polyover.h
├── task_group
│ └── sudoku
│ │ ├── input2
│ │ ├── input1
│ │ ├── input3
│ │ ├── input4
│ │ ├── msvs
│ │ └── sudoku.sln
│ │ └── Makefile.windows
├── task
│ └── tree_sum
│ │ ├── SerialSumTree.cpp
│ │ ├── common.h
│ │ ├── msvs
│ │ └── tree_sum.sln
│ │ └── Makefile
├── graph
│ ├── som
│ │ ├── msvs
│ │ │ └── som.sln
│ │ ├── Makefile.windows
│ │ └── Makefile
│ ├── stereo
│ │ ├── msvs
│ │ │ └── stereo.sln
│ │ └── Makefile
│ ├── binpack
│ │ ├── msvs
│ │ │ └── binpack.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
│ ├── fgbzip2
│ │ ├── msvs
│ │ │ └── fgbzip2.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
│ ├── matmult
│ │ ├── msvs
│ │ │ └── matmult.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
│ ├── cholesky
│ │ ├── msvs
│ │ │ └── cholesky.sln
│ │ └── Makefile
│ ├── logic_sim
│ │ ├── msvs
│ │ │ └── logic_sim.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
│ └── dining_philosophers
│ │ ├── msvs
│ │ └── dining_philosophers.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
├── pipeline
│ └── square
│ │ ├── msvs
│ │ └── square.sln
│ │ ├── gen_input.cpp
│ │ └── Makefile
├── parallel_reduce
│ └── primes
│ │ ├── msvs
│ │ └── primes.sln
│ │ └── primes.h
├── test_all
│ └── fibonacci
│ │ ├── msvs
│ │ └── fibonacci.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
├── concurrent_priority_queue
│ └── shortpath
│ │ ├── msvs
│ │ └── shortpath.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
├── concurrent_hash_map
│ └── count_strings
│ │ ├── msvs
│ │ └── count_strings.sln
│ │ ├── Makefile
│ │ └── Makefile.windows
└── parallel_do
│ └── parallel_preorder
│ ├── msvs
│ └── parallel_preorder.sln
│ └── Makefile
├── src
├── test
│ ├── test_opencl_kernel_32.spir
│ ├── test_opencl_kernel_64.spir
│ ├── test_opencl_precompiled_kernel_gpu_32.ir
│ ├── test_opencl_precompiled_kernel_gpu_64.ir
│ ├── test_tbb_condition_variable.cpp
│ ├── test_tbb_thread.cpp
│ ├── test_cache_aligned_allocator_STL.cpp
│ ├── test_std_thread.cpp
│ ├── harness_runtime_loader.h
│ ├── harness_mic.h
│ ├── test_ScalableAllocator_STL.cpp
│ ├── harness_assert.h
│ ├── test_handle_perror.cpp
│ ├── harness_allocator_overload.h
│ └── harness_task.h
├── rml
│ ├── server
│ │ ├── index.html
│ │ ├── win32-rml-export.def
│ │ ├── win64-rml-export.def
│ │ └── lin-rml-export.def
│ ├── test
│ │ └── test_rml_omp_c_linkage.c
│ ├── client
│ │ ├── omp_dynamic_link.cpp
│ │ ├── omp_dynamic_link.h
│ │ ├── library_assert.h
│ │ ├── rml_omp.cpp
│ │ ├── index.html
│ │ └── rml_tbb.cpp
│ ├── include
│ │ └── index.html
│ └── index.html
├── tbb
│ ├── mac32-tbb-export.def
│ ├── mac64-tbb-export.def
│ ├── win32-tbb-export.def
│ ├── win64-tbb-export.def
│ ├── intel64-masm
│ │ ├── intel64_misc.asm
│ │ └── atomic_support.asm
│ ├── critical_section.cpp
│ ├── index.html
│ ├── ia64-gas
│ │ ├── pause.s
│ │ ├── lock_byte.s
│ │ └── log2.s
│ ├── win64-gcc-tbb-export.def
│ ├── lin64-tbb-export.def
│ ├── ia32-masm
│ │ └── lock_byte.asm
│ ├── lin64ipf-tbb-export.def
│ ├── lin32-tbb-export.def
│ ├── tools_api
│ │ └── disable_warnings.h
│ └── ibm_aix51
│ │ └── atomic_support.c
├── perf
│ └── run_statistics.sh
├── old
│ └── task_v2.cpp
└── tbbmalloc
│ ├── lin32-proxy-export.def
│ ├── lin64-proxy-export.def
│ ├── lin64ipf-proxy-export.def
│ ├── tbbmalloc_internal_api.h
│ ├── win32-tbbmalloc-export.def
│ ├── mac32-tbbmalloc-export.def
│ ├── mac64-tbbmalloc-export.def
│ ├── win32-gcc-tbbmalloc-export.def
│ ├── win64-gcc-tbbmalloc-export.def
│ └── win64-tbbmalloc-export.def
├── README
├── doc
└── copyright_brand_disclaimer_doxygen.txt
├── python
├── tbb
│ └── __main__.py
├── TBB.py
├── rml
│ └── ipc_utils.h
└── Makefile
├── include
├── index.html
├── tbb
│ ├── index.html
│ ├── tbb_disable_exceptions.h
│ ├── aligned_space.h
│ ├── null_mutex.h
│ ├── compat
│ │ └── thread
│ ├── flow_graph_abstractions.h
│ └── null_rw_mutex.h
└── serial
│ └── tbb
│ └── tbb_annotate.h
├── .gitattributes
├── cmake
├── templates
│ └── TBBConfigVersion.cmake.in
└── tbb_config_generator.cmake
├── .gitignore
└── README.md
/examples/common/gui/xcode/tbbExample/PkgInfo:
--------------------------------------------------------------------------------
1 | APPL????
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/src/test/test_opencl_kernel_32.spir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/src/test/test_opencl_kernel_32.spir
--------------------------------------------------------------------------------
/src/test/test_opencl_kernel_64.spir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/src/test/test_opencl_kernel_64.spir
--------------------------------------------------------------------------------
/examples/task_arena/fractal/msvs/gui.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/task_arena/fractal/msvs/gui.ico
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/gui.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/gui.ico
--------------------------------------------------------------------------------
/examples/task_arena/fractal/msvs/small.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/task_arena/fractal/msvs/small.ico
--------------------------------------------------------------------------------
/examples/parallel_for/seismic/msvs/small.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/seismic/msvs/small.ico
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/small.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/small.ico
--------------------------------------------------------------------------------
/examples/parallel_for/game_of_life/msvs/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/game_of_life/msvs/app.ico
--------------------------------------------------------------------------------
/examples/parallel_for/polygon_overlay/speedup.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/polygon_overlay/speedup.gif
--------------------------------------------------------------------------------
/src/test/test_opencl_precompiled_kernel_gpu_32.ir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/src/test/test_opencl_precompiled_kernel_gpu_32.ir
--------------------------------------------------------------------------------
/src/test/test_opencl_precompiled_kernel_gpu_64.ir:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/src/test/test_opencl_precompiled_kernel_gpu_64.ir
--------------------------------------------------------------------------------
/examples/parallel_for/seismic/msvs/SeismicSimulation.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/seismic/msvs/SeismicSimulation.ico
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/Assets/Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/win8ui/Assets/Logo.png
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.nib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.nib
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/Assets/SmallLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/win8ui/Assets/SmallLogo.png
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/win8ui/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/Assets/SplashScreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ValveSoftware/tbb/HEAD/examples/parallel_for/tachyon/msvs/win8ui/Assets/SplashScreen.png
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Intel(R) Threading Building Blocks - README
2 |
3 | See index.html for directions and documentation.
4 |
5 | If source is present (./Makefile and src/ directories),
6 | type 'gmake' in this directory to build and test.
7 |
8 | See examples/index.html for runnable examples and directions.
9 |
10 | See http://threadingbuildingblocks.org for full documentation
11 | and software information.
12 |
--------------------------------------------------------------------------------
/doc/copyright_brand_disclaimer_doxygen.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
4 |
5 | Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
6 | registered trademarks or trademarks of Intel Corporation or its
7 | subsidiaries in the United States and other countries.
8 |
9 | * Other names and brands may be claimed as the property of others.
10 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/input2:
--------------------------------------------------------------------------------
1 | 2 0 1 0 0 0 0 8 0 0 8 0 2 1 9 6 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 3 0 1 0 0 5 0 0 0 8 0 0 0 6
2 |
3 |
4 |
5 |
6 |
7 |
8 | 2 0 1 0 0 0 0 8 0
9 | 0 8 0 2 1 9 6 0 0
10 | 0 0 5 0 0 0 7 0 0
11 |
12 | 0 5 2 1 0 0 4 0 0
13 | 0 0 0 0 0 5 0 0 7
14 | 4 0 0 7 0 0 0 3 0
15 |
16 | 0 3 0 0 0 2 0 0 5
17 | 0 0 0 0 3 0 1 0 0
18 | 5 0 0 0 8 0 0 0 6
19 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/input1:
--------------------------------------------------------------------------------
1 | 1 0 0 9 0 0 0 8 0 0 8 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 1 0 0 9 0 0 0 8 0
10 | 0 8 0 2 0 0 0 0 0
11 | 0 0 5 0 0 0 7 0 0
12 |
13 | 0 5 2 1 0 0 4 0 0
14 | 0 0 0 0 0 5 0 0 7
15 | 4 0 0 7 0 0 0 3 0
16 |
17 | 0 3 0 0 0 2 0 0 5
18 | 0 0 0 0 0 0 1 0 0
19 | 5 0 0 0 1 0 0 0 0
20 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/input3:
--------------------------------------------------------------------------------
1 | 1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 6 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 1 0 0 9 0 0 0 8 0
10 | 0 0 0 2 0 0 0 0 0
11 | 0 0 5 0 0 0 7 0 0
12 |
13 | 0 5 2 6 0 0 4 0 0
14 | 0 0 0 0 0 5 0 0 7
15 | 4 0 0 7 0 0 0 3 0
16 |
17 | 0 3 0 0 0 2 0 0 5
18 | 0 0 0 0 0 0 1 0 0
19 | 5 0 0 0 1 0 0 0 0
20 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/input4:
--------------------------------------------------------------------------------
1 | 1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 0 2 6 0 0 0 0 0 0 0 0 0 0 5 0 0 7 4 0 0 0 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 1 0 0 9 0 0 0 8 0
10 | 0 0 0 2 0 0 0 0 0
11 | 0 0 5 0 0 0 7 0 0
12 |
13 | 0 0 2 6 0 0 0 0 0
14 | 0 0 0 0 0 5 0 0 7
15 | 4 0 0 0 0 0 0 3 0
16 |
17 | 0 3 0 0 0 2 0 0 5
18 | 0 0 0 0 0 0 1 0 0
19 | 5 0 0 0 1 0 0 0 0
20 |
--------------------------------------------------------------------------------
/src/rml/server/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Overview
4 |
5 | This directory has source code internal to the server.
6 |
7 |
8 | Up to parent directory
9 |
10 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
11 |
12 | Intel is a registered trademark or trademark of Intel Corporation
13 | or its subsidiaries in the United States and other countries.
14 |
15 | * Other names and brands may be claimed as the property of others.
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/python/tbb/__main__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright (c) 2016-2018 Intel Corporation
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | #
18 | #
19 | #
20 |
21 |
22 | from . import _main
23 | from sys import exit
24 | exit(_main())
25 |
--------------------------------------------------------------------------------
/src/tbb/mac32-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #define __TBB_SYMBOL( sym ) _##sym
22 | #include "mac32-tbb-export.lst"
23 |
24 |
--------------------------------------------------------------------------------
/src/tbb/mac64-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #define __TBB_SYMBOL( sym ) _##sym
22 | #include "mac64-tbb-export.lst"
23 |
24 |
--------------------------------------------------------------------------------
/include/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Overview
5 | Include files for Intel® Threading Building Blocks (Intel® TBB).
6 |
7 | Directories
8 |
9 | - tbb
10 |
- Include files for Intel TBB classes and functions.
11 |
- serial/tbb
12 |
- Include files for a sequential implementation of the parallel_for algorithm.
13 |
14 |
15 |
16 | Up to parent directory
17 |
18 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
19 |
20 | Intel is a registered trademark or trademark of Intel Corporation
21 | or its subsidiaries in the United States and other countries.
22 |
23 | * Other names and brands may be claimed as the property of others.
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/rml/test/test_rml_omp_c_linkage.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | void Cplusplus();
22 |
23 | int main() {
24 | Cplusplus();
25 | return 0;
26 | }
27 |
--------------------------------------------------------------------------------
/examples/parallel_for/game_of_life/msvs/resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | //{{NO_DEPENDENCIES}}
22 | // Microsoft Visual C++ generated include file.
23 | // Used by app.rc
24 |
--------------------------------------------------------------------------------
/examples/common/toolset.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Intel C++ Compiler 15.0 [Intel(R) System Studio]
5 | Intel C++ Compiler XE 15.0
6 | Intel C++ Compiler 16.0
7 | true
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/rml/client/omp_dynamic_link.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "omp_dynamic_link.h"
22 | #include "library_assert.h"
23 | #include "tbb/dynamic_link.cpp" // Refers to src/tbb, not include/tbb
24 |
25 |
--------------------------------------------------------------------------------
/src/tbb/win32-tbb-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | EXPORTS
20 |
21 | #define __TBB_SYMBOL( sym ) sym
22 | #if _M_ARM
23 | #include "winrt-tbb-export.lst"
24 | #else
25 | #include "win32-tbb-export.lst"
26 | #endif
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/rml/include/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Overview
4 |
5 | This directory has the include files for the Resource Management Layer (RML).
6 |
7 | Files
8 |
9 |
10 | rml_base.h
11 |
- Interfaces shared by TBB and OpenMP.
12 |
rml_omp.h
13 |
- Interface exclusive to OpenMP.
14 |
rml_tbb.h
15 |
- Interface exclusive to TBB.
16 |
17 |
18 |
19 | Up to parent directory
20 |
21 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
22 |
23 | Intel is a registered trademark or trademark of Intel Corporation
24 | or its subsidiaries in the United States and other countries.
25 |
26 | * Other names and brands may be claimed as the property of others.
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/python/TBB.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | #
3 | # Copyright (c) 2016-2018 Intel Corporation
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | #
18 | #
19 | #
20 |
21 |
22 | from tbb import *
23 | from tbb import __all__, __doc__
24 |
25 | if __name__ == "__main__":
26 | from tbb import _main
27 | import sys
28 | sys.exit(_main())
29 |
--------------------------------------------------------------------------------
/src/rml/server/win32-rml-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | EXPORTS
20 |
21 | __RML_open_factory
22 | __RML_close_factory
23 | __TBB_make_rml_server
24 | __KMP_make_rml_server
25 | __TBB_call_with_my_server_info
26 | __KMP_call_with_my_server_info
27 |
28 |
--------------------------------------------------------------------------------
/src/rml/server/win64-rml-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | EXPORTS
20 |
21 | __RML_open_factory
22 | __RML_close_factory
23 | __TBB_make_rml_server
24 | __KMP_make_rml_server
25 | __TBB_call_with_my_server_info
26 | __KMP_call_with_my_server_info
27 |
28 |
--------------------------------------------------------------------------------
/src/tbb/win64-tbb-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | ; This file is organized with a section for each .cpp file.
20 | ; Each of these sections is in alphabetical order.
21 |
22 | EXPORTS
23 |
24 | #define __TBB_SYMBOL( sym ) sym
25 | #include "win64-tbb-export.lst"
26 |
27 |
--------------------------------------------------------------------------------
/src/rml/server/lin-rml-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | __RML_open_factory;
24 | __RML_close_factory;
25 | __TBB_make_rml_server;
26 | __KMP_make_rml_server;
27 | __TBB_call_with_my_server_info;
28 | __KMP_call_with_my_server_info;
29 | local:*;
30 | };
31 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/pch.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include "App.xaml.h"
30 |
--------------------------------------------------------------------------------
/src/test/test_tbb_condition_variable.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "tbb/tbb_config.h"
22 |
23 | #include "test_condition_variable.h"
24 |
25 | int TestMain() {
26 | REMARK( "testing with tbb condvar\n" );
27 | DoCondVarTest();
28 | return Harness::Done;
29 | }
30 |
--------------------------------------------------------------------------------
/src/tbb/intel64-masm/intel64_misc.asm:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | .code
20 | ALIGN 8
21 | PUBLIC __TBB_get_cpu_ctl_env
22 | __TBB_get_cpu_ctl_env:
23 | stmxcsr [rcx]
24 | fstcw [rcx+4]
25 | ret
26 | .code
27 | ALIGN 8
28 | PUBLIC __TBB_set_cpu_ctl_env
29 | __TBB_set_cpu_ctl_env:
30 | ldmxcsr [rcx]
31 | fldcw [rcx+4]
32 | ret
33 | end
34 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Set the default behavior, in case people don't have core.autocrlf set.
2 | * text=auto
3 |
4 | # Explicitly declare text files you want to always be normalized and converted
5 | # to native line endings on checkout.
6 | *.c text
7 | *.h text
8 | *.cpp text
9 | *.def text
10 | *.rc text
11 | *.i text
12 | *.sh text
13 | *.csh text
14 | *.mk text
15 | *.java text
16 | *.csv text
17 | *.lst text
18 | *.asm text
19 | *.cfg text
20 | *.css text
21 | *.inc text
22 | *.js text
23 | *.rb text
24 | *.strings text
25 | *.txt text
26 | *export.lst text
27 | *.xml text
28 | *.py text
29 | *.md text
30 | *.classpath text
31 | *.cproject text
32 | *.project text
33 | *.properties text
34 | *.java text
35 | *.gradle text
36 |
37 | # Declare files that will always have CRLF line endings on checkout.
38 | *.sln text eol=crlf
39 | *.bat text eol=crlf
40 |
41 | # Denote all files that are truly binary and should not be modified.
42 | *.png binary
43 | *.jpg binary
44 | *.ico binary
45 | *.spir binary
46 |
--------------------------------------------------------------------------------
/examples/task/tree_sum/SerialSumTree.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "common.h"
22 |
23 | Value SerialSumTree( TreeNode* root ) {
24 | Value result = root->value;
25 | if( root->left )
26 | result += SerialSumTree(root->left);
27 | if( root->right )
28 | result += SerialSumTree(root->right);
29 | return result;
30 | }
31 |
--------------------------------------------------------------------------------
/src/rml/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Overview
4 |
5 | The subdirectories pertain to the Resource Management Layer (RML).
6 |
7 | Directories
8 |
9 |
10 | include/
11 |
- Include files used by clients of RML.
12 |
client/
13 |
- Source files for code that must be statically linked with a client.
14 |
server/
15 |
- Source files for the RML server.
16 |
test/
17 |
- Unit tests for RML server and its components.
18 |
19 |
20 |
21 | Up to parent directory
22 |
23 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
24 |
25 | Intel is a registered trademark or trademark of Intel Corporation
26 | or its subsidiaries in the United States and other countries.
27 |
28 | * Other names and brands may be claimed as the property of others.
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/tbb/critical_section.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "tbb/critical_section.h"
22 | #include "itt_notify.h"
23 |
24 | namespace tbb {
25 | namespace internal {
26 |
27 | void critical_section_v4::internal_construct() {
28 | ITT_SYNC_CREATE(&my_impl, _T("ppl::critical_section"), _T(""));
29 | }
30 | } // namespace internal
31 | } // namespace tbb
32 |
--------------------------------------------------------------------------------
/include/tbb/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Overview
5 | Include files for Intel® Threading Building Blocks classes and functions.
6 |
7 |
Click here to see all files in the directory.
8 |
9 | Directories
10 |
11 | - compat
12 |
- Include files for source level compatibility with other frameworks.
13 |
- internal
14 |
- Include files with implementation details; not for direct use.
15 |
- machine
16 |
- Include files for low-level architecture specific functionality; not for direct use.
17 |
18 |
19 |
20 | Up to parent directory
21 |
22 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
23 |
24 | Intel is a registered trademark or trademark of Intel Corporation
25 | or its subsidiaries in the United States and other countries.
26 |
27 | * Other names and brands may be claimed as the property of others.
28 |
29 |
30 |
--------------------------------------------------------------------------------
/python/rml/ipc_utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2017-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __IPC_UTILS_H
22 | #define __IPC_UTILS_H
23 |
24 | namespace tbb {
25 | namespace internal {
26 | namespace rml {
27 |
28 | char* get_shared_name(const char* prefix);
29 | int get_num_threads(const char* env_var);
30 | bool get_enable_flag(const char* env_var);
31 |
32 | }}} //tbb::internal::rml
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/src/rml/client/omp_dynamic_link.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __KMP_omp_dynamic_link_H
22 | #define __KMP_omp_dynamic_link_H
23 |
24 | #define OPEN_INTERNAL_NAMESPACE namespace __kmp {
25 | #define CLOSE_INTERNAL_NAMESPACE }
26 |
27 | #include "library_assert.h"
28 | #include "tbb/dynamic_link.h" // Refers to src/tbb, not include/tbb
29 |
30 | #endif /* __KMP_omp_dynamic_link_H */
31 |
--------------------------------------------------------------------------------
/cmake/templates/TBBConfigVersion.cmake.in:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2017-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | set(PACKAGE_VERSION @TBB_VERSION@)
20 |
21 | if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
22 | set(PACKAGE_VERSION_COMPATIBLE FALSE)
23 | else()
24 | set(PACKAGE_VERSION_COMPATIBLE TRUE)
25 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
26 | set(PACKAGE_VERSION_EXACT TRUE)
27 | endif()
28 | endif()
29 |
--------------------------------------------------------------------------------
/examples/common/gui/dxcheck.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | REM
3 | REM Copyright (c) 2005-2018 Intel Corporation
4 | REM
5 | REM Licensed under the Apache License, Version 2.0 (the "License");
6 | REM you may not use this file except in compliance with the License.
7 | REM You may obtain a copy of the License at
8 | REM
9 | REM http://www.apache.org/licenses/LICENSE-2.0
10 | REM
11 | REM Unless required by applicable law or agreed to in writing, software
12 | REM distributed under the License is distributed on an "AS IS" BASIS,
13 | REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | REM See the License for the specific language governing permissions and
15 | REM limitations under the License.
16 | REM
17 | REM
18 | REM
19 | REM
20 | REM
21 | if "%DXSDK_DIR%"=="" goto error_no_DXSDK
22 | goto end
23 |
24 | :error_no_DXSDK
25 | echo DirectX SDK Check : error : This example requires the DirectX SDK. Either (re)-install the DirectX SDK, or set the DXSDK_DIR environment variable to indicate where it is installed.
26 |
27 | :end
28 |
29 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #define IDC_MYICON 2
22 | #define IDD_GUI 102
23 | #define IDS_APP_TITLE 103
24 | #define IDI_GUI 107
25 | #define IDI_SMALL 108
26 | #define IDC_GUI 109
27 | #define IDR_MAINFRAME 128
28 | #define IDC_STATIC -1
29 |
--------------------------------------------------------------------------------
/src/test/test_tbb_thread.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "tbb/tbb_thread.h"
22 | #define THREAD tbb::tbb_thread
23 | #define THIS_THREAD tbb::this_tbb_thread
24 | #define THIS_THREAD_SLEEP THIS_THREAD::sleep
25 | #include "test_thread.h"
26 | #include "harness.h"
27 |
28 | /* we want to test tbb::tbb_thread */
29 | int TestMain () {
30 | CheckSignatures();
31 | RunTests();
32 | return Harness::Done;
33 | }
34 |
--------------------------------------------------------------------------------
/src/tbb/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Overview
5 | This directory contains the source code of the TBB core components.
6 |
7 | Directories
8 |
9 | - tools_api
10 |
- Source code of the interface components provided by the Intel® Parallel Studio tools.
11 |
- intel64-masm
12 |
- Assembly code for the Intel® 64 architecture.
13 |
- ia32-masm
14 |
- Assembly code for IA32 architecture.
15 |
- ia64-gas
16 |
- Assembly code for IA-64 architecture.
17 |
- ibm_aix51
18 |
- Assembly code for AIX 5.1 port.
19 |
20 |
21 |
22 | Up to parent directory
23 |
24 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
25 |
26 | Intel is a registered trademark or trademark of Intel Corporation
27 | or its subsidiaries in the United States and other countries.
28 |
29 | * Other names and brands may be claimed as the property of others.
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/rml/client/library_assert.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef LIBRARY_ASSERT_H
22 | #define LIBRARY_ASSERT_H
23 |
24 | #ifndef LIBRARY_ASSERT
25 | #ifdef KMP_ASSERT2
26 | #define LIBRARY_ASSERT(x,y) KMP_ASSERT2((x),(y))
27 | #else
28 | #include
29 | #define LIBRARY_ASSERT(x,y) assert(x)
30 | #define __TBB_DYNAMIC_LOAD_ENABLED 1
31 | #endif
32 | #endif /* LIBRARY_ASSERT */
33 |
34 | #endif /* LIBRARY_ASSERT_H */
35 |
--------------------------------------------------------------------------------
/src/tbb/ia64-gas/pause.s:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2018 Intel Corporation
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | //
15 | //
16 | //
17 | //
18 |
19 | .section .text
20 | .align 16
21 | // void __TBB_machine_pause( long count );
22 | // r32 = count
23 | .proc __TBB_machine_pause#
24 | .global __TBB_machine_pause#
25 | count = r32
26 | __TBB_machine_pause:
27 | hint.m 0
28 | add count=-1,count
29 | ;;
30 | cmp.eq p6,p7=0,count
31 | (p7) br.cond.dpnt __TBB_machine_pause
32 | (p6) br.ret.sptk.many b0
33 | .endp __TBB_machine_pause#
34 |
--------------------------------------------------------------------------------
/src/tbb/win64-gcc-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 |
24 | #define __TBB_SYMBOL( sym ) sym;
25 | #include "win64-gcc-tbb-export.lst"
26 |
27 | local:
28 |
29 | /* TBB symbols */
30 | *3tbb*;
31 | *__TBB*;
32 |
33 | /* Intel Compiler (libirc) symbols */
34 | __intel_*;
35 | _intel_*;
36 | get_msg_buf;
37 | get_text_buf;
38 | message_catalog;
39 | print_buf;
40 | irc__get_msg;
41 | irc__print;
42 |
43 | };
44 |
45 |
--------------------------------------------------------------------------------
/examples/task_arena/fractal/msvs/resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #define IDC_MYICON 2
22 | #define IDD_GUI 102
23 | #define IDS_APP_TITLE 103
24 | #define IDI_GUI 107
25 | #define IDI_SMALL 108
26 | #define IDC_GUI 109
27 | #define IDR_MAINFRAME 128
28 | #define IDC_STATIC -1
29 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | //
22 | // Prefix header for all source files of the 'tbbExample' target in the 'tbbExample' project
23 | //
24 |
25 | #import
26 |
27 | #if TARGET_OS_IPHONE
28 | #ifdef __OBJC__
29 | #import
30 | #import
31 | #endif
32 | #elif TARGET_OS_MAC
33 | #ifdef __OBJC__
34 | #import
35 | #endif
36 | #endif
37 |
--------------------------------------------------------------------------------
/src/tbb/lin64-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 |
24 | #define __TBB_SYMBOL( sym ) sym;
25 | #include "lin64-tbb-export.lst"
26 |
27 | local:
28 |
29 | /* TBB symbols */
30 | *3tbb*;
31 | *__TBB*;
32 |
33 | /* ITT symbols */
34 | __itt_*;
35 |
36 | /* Intel Compiler (libirc) symbols */
37 | __intel_*;
38 | _intel_*;
39 | get_msg_buf;
40 | get_text_buf;
41 | message_catalog;
42 | print_buf;
43 | irc__get_msg;
44 | irc__print;
45 |
46 | };
47 |
--------------------------------------------------------------------------------
/src/tbb/ia32-masm/lock_byte.asm:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE
20 | .686
21 | .model flat,c
22 | .code
23 | ALIGN 4
24 | PUBLIC c __TBB_machine_trylockbyte
25 | __TBB_machine_trylockbyte:
26 | mov edx,4[esp]
27 | mov al,[edx]
28 | mov cl,1
29 | test al,1
30 | jnz __TBB_machine_trylockbyte_contended
31 | lock cmpxchg [edx],cl
32 | jne __TBB_machine_trylockbyte_contended
33 | mov eax,1
34 | ret
35 | __TBB_machine_trylockbyte_contended:
36 | xor eax,eax
37 | ret
38 | end
39 |
--------------------------------------------------------------------------------
/src/tbb/lin64ipf-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 |
24 | #define __TBB_SYMBOL( sym ) sym;
25 | #include "lin64ipf-tbb-export.lst"
26 |
27 | local:
28 |
29 | /* TBB symbols */
30 | *3tbb*;
31 | *__TBB*;
32 |
33 | /* ITT symbols */
34 | __itt_*;
35 |
36 | /* Intel Compiler (libirc) symbols */
37 | __intel_*;
38 | _intel_*;
39 | ?0_memcopyA;
40 | ?0_memcopyDu;
41 | ?0_memcpyD;
42 | ?1__memcpy;
43 | ?1__memmove;
44 | ?1__serial_memmove;
45 | memcpy;
46 | memset;
47 |
48 | };
49 |
--------------------------------------------------------------------------------
/examples/parallel_for/polygon_overlay/msvs/resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | //{{NO_DEPENDENCIES}}
22 | // Microsoft Visual C++ generated include file.
23 | // Used by pover.rc
24 |
25 | // Next default values for new objects
26 | //
27 | #ifdef APSTUDIO_INVOKED
28 | #ifndef APSTUDIO_READONLY_SYMBOLS
29 | #define _APS_NEXT_RESOURCE_VALUE 101
30 | #define _APS_NEXT_COMMAND_VALUE 40001
31 | #define _APS_NEXT_CONTROL_VALUE 1001
32 | #define _APS_NEXT_SYMED_VALUE 101
33 | #endif
34 | #endif
35 |
--------------------------------------------------------------------------------
/examples/task/tree_sum/common.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | typedef float Value;
22 |
23 | struct TreeNode {
24 | //! Pointer to left subtree
25 | TreeNode* left;
26 | //! Pointer to right subtree
27 | TreeNode* right;
28 | //! Number of nodes in this subtree, including this node.
29 | long node_count;
30 | //! Value associated with the node.
31 | Value value;
32 | };
33 |
34 | Value SerialSumTree( TreeNode* root );
35 | Value SimpleParallelSumTree( TreeNode* root );
36 | Value OptimizedParallelSumTree( TreeNode* root );
37 |
--------------------------------------------------------------------------------
/include/serial/tbb/tbb_annotate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_annotate_H
22 | #define __TBB_annotate_H
23 |
24 | // Macros used by the Intel(R) Parallel Advisor.
25 | #ifdef __TBB_NORMAL_EXECUTION
26 | #define ANNOTATE_SITE_BEGIN( site )
27 | #define ANNOTATE_SITE_END( site )
28 | #define ANNOTATE_TASK_BEGIN( task )
29 | #define ANNOTATE_TASK_END( task )
30 | #define ANNOTATE_LOCK_ACQUIRE( lock )
31 | #define ANNOTATE_LOCK_RELEASE( lock )
32 | #else
33 | #include
34 | #endif
35 |
36 | #endif /* __TBB_annotate_H */
37 |
--------------------------------------------------------------------------------
/src/perf/run_statistics.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (c) 2005-2018 Intel Corporation
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 | #
18 | #
19 | #
20 |
21 | export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
22 | #setting output format .csv, 'pivot' - is pivot table mode, ++ means append
23 | export STAT_FORMAT=pivot-csv++
24 | #check existing files because of apend mode
25 | ls *.csv
26 | rm -i *.csv
27 | #setting a delimiter in txt or csv file
28 | #export STAT_DELIMITER=,
29 | export STAT_RUNINFO1=Host=`hostname -s`
30 | #append a suffix after the filename
31 | #export STAT_SUFFIX=$STAT_RUNINFO1
32 | for ((i=1;i<=${repeat:=100};++i)); do echo $i of $repeat: && STAT_RUNINFO2=Run=$i $* || break; done
33 |
--------------------------------------------------------------------------------
/src/test/test_cache_aligned_allocator_STL.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | // Test whether cache_aligned_allocator works with some of the host's STL containers.
22 |
23 | #include "tbb/cache_aligned_allocator.h"
24 | #include "tbb/tbb_allocator.h"
25 |
26 | #define HARNESS_NO_PARSE_COMMAND_LINE 1
27 | #include "test_allocator_STL.h"
28 |
29 | int TestMain () {
30 | TestAllocatorWithSTL >();
31 | TestAllocatorWithSTL >();
32 | TestAllocatorWithSTL >();
33 | return Harness::Done;
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 |
22 | #pragma once
23 |
24 | #include "App.g.h"
25 | #include "DirectXPage.xaml.h"
26 |
27 | namespace tbbTachyon
28 | {
29 | ///
30 | /// Provides application-specific behavior to supplement the default Application class.
31 | ///
32 | ref class App sealed
33 | {
34 | public:
35 | App();
36 | virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs) override;
37 |
38 | private:
39 | DirectXPage^ m_directXPage;
40 | };
41 | }
42 |
--------------------------------------------------------------------------------
/src/tbb/lin32-tbb-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 |
24 | #define __TBB_SYMBOL( sym ) sym;
25 | #include "lin32-tbb-export.lst"
26 |
27 | local:
28 |
29 | /* TBB symbols */
30 | *3tbb*;
31 | *__TBB*;
32 |
33 | /* ITT symbols */
34 | __itt_*;
35 |
36 | /* Intel Compiler (libirc) symbols */
37 | __intel_*;
38 | _intel_*;
39 | get_memcpy_largest_cachelinesize;
40 | get_memcpy_largest_cache_size;
41 | get_mem_ops_method;
42 | init_mem_ops_method;
43 | irc__get_msg;
44 | irc__print;
45 | override_mem_ops_method;
46 | set_memcpy_largest_cachelinesize;
47 | set_memcpy_largest_cache_size;
48 |
49 | };
50 |
--------------------------------------------------------------------------------
/include/tbb/tbb_disable_exceptions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | //! To disable use of exceptions, include this header before any other header file from the library.
22 |
23 | //! The macro that prevents use of exceptions in the library files
24 | #undef TBB_USE_EXCEPTIONS
25 | #define TBB_USE_EXCEPTIONS 0
26 |
27 | //! Prevent compilers from issuing exception related warnings.
28 | /** Note that the warnings are suppressed for all the code after this header is included. */
29 | #if _MSC_VER
30 | #if __INTEL_COMPILER
31 | #pragma warning (disable: 583)
32 | #else
33 | #pragma warning (disable: 4530 4577)
34 | #endif
35 | #endif
36 |
--------------------------------------------------------------------------------
/src/test/test_std_thread.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #define TBB_IMPLEMENT_CPP0X 1
22 | #include "tbb/tbb_config.h"
23 |
24 | #if __TBB_WIN8UI_SUPPORT
25 | #define HARNESS_NO_PARSE_COMMAND_LINE 1
26 | #include "harness.h"
27 | int TestMain() {
28 | return Harness::Skipped;
29 | }
30 | #else
31 | #include "tbb/compat/thread"
32 | #define THREAD std::thread
33 | #define THIS_THREAD std::this_thread
34 | #define THIS_THREAD_SLEEP THIS_THREAD::sleep_for
35 | #include "test_thread.h"
36 | #include "harness.h"
37 |
38 | int TestMain () {
39 | CheckSignatures();
40 | RunTests();
41 | return Harness::Done;
42 | }
43 | #endif
44 |
--------------------------------------------------------------------------------
/src/old/task_v2.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | /* This compilation unit provides definition of task::destroy( task& )
22 | that is binary compatible with TBB 2.x. In TBB 3.0, the method became
23 | static, and its name decoration changed, though the definition remained.
24 |
25 | The macro switch should be set prior to including task.h
26 | or any TBB file that might bring task.h up.
27 | */
28 | #define __TBB_DEPRECATED_TASK_INTERFACE 1
29 | #include "tbb/task.h"
30 |
31 | namespace tbb {
32 |
33 | void task::destroy( task& victim ) {
34 | // Forward to static version
35 | task_base::destroy( victim );
36 | }
37 |
38 | } // namespace tbb
39 |
--------------------------------------------------------------------------------
/src/tbbmalloc/lin32-proxy-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | calloc;
24 | free;
25 | malloc;
26 | realloc;
27 | posix_memalign;
28 | memalign;
29 | aligned_alloc;
30 | valloc;
31 | pvalloc;
32 | mallinfo;
33 | mallopt;
34 | malloc_usable_size;
35 | __libc_malloc;
36 | __libc_realloc;
37 | __libc_calloc;
38 | __libc_free;
39 | __libc_memalign;
40 | __libc_pvalloc;
41 | __libc_valloc;
42 | __TBB_malloc_proxy;
43 | _ZdaPv; /* next ones are new/delete */
44 | _ZdaPvRKSt9nothrow_t;
45 | _ZdlPv;
46 | _ZdlPvRKSt9nothrow_t;
47 | _Znaj;
48 | _ZnajRKSt9nothrow_t;
49 | _Znwj;
50 | _ZnwjRKSt9nothrow_t;
51 |
52 | local:
53 |
54 | /* TBB symbols */
55 | *3rml8internal*;
56 | *3tbb*;
57 | *__TBB*;
58 |
59 | };
60 |
--------------------------------------------------------------------------------
/src/tbbmalloc/lin64-proxy-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | calloc;
24 | free;
25 | malloc;
26 | realloc;
27 | posix_memalign;
28 | memalign;
29 | aligned_alloc;
30 | valloc;
31 | pvalloc;
32 | mallinfo;
33 | mallopt;
34 | malloc_usable_size;
35 | __libc_malloc;
36 | __libc_realloc;
37 | __libc_calloc;
38 | __libc_free;
39 | __libc_memalign;
40 | __libc_pvalloc;
41 | __libc_valloc;
42 | __TBB_malloc_proxy;
43 | _ZdaPv; /* next ones are new/delete */
44 | _ZdaPvRKSt9nothrow_t;
45 | _ZdlPv;
46 | _ZdlPvRKSt9nothrow_t;
47 | _Znam;
48 | _ZnamRKSt9nothrow_t;
49 | _Znwm;
50 | _ZnwmRKSt9nothrow_t;
51 |
52 | local:
53 |
54 | /* TBB symbols */
55 | *3rml8internal*;
56 | *3tbb*;
57 | *__TBB*;
58 |
59 | };
60 |
--------------------------------------------------------------------------------
/src/tbbmalloc/lin64ipf-proxy-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | calloc;
24 | free;
25 | malloc;
26 | realloc;
27 | posix_memalign;
28 | memalign;
29 | aligned_alloc;
30 | valloc;
31 | pvalloc;
32 | mallinfo;
33 | mallopt;
34 | malloc_usable_size;
35 | __libc_malloc;
36 | __libc_realloc;
37 | __libc_calloc;
38 | __libc_free;
39 | __libc_memalign;
40 | __libc_pvalloc;
41 | __libc_valloc;
42 | __TBB_malloc_proxy;
43 | _ZdaPv; /* next ones are new/delete */
44 | _ZdaPvRKSt9nothrow_t;
45 | _ZdlPv;
46 | _ZdlPvRKSt9nothrow_t;
47 | _Znam;
48 | _ZnamRKSt9nothrow_t;
49 | _Znwm;
50 | _ZnwmRKSt9nothrow_t;
51 |
52 | local:
53 |
54 | /* TBB symbols */
55 | *3rml8internal*;
56 | *3tbb*;
57 | *__TBB*;
58 |
59 | };
60 |
--------------------------------------------------------------------------------
/src/test/harness_runtime_loader.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef harness_runtime_loader_H
22 | #define harness_runtime_loader_H
23 |
24 | #if HARNESS_USE_RUNTIME_LOADER
25 | #if TEST_USES_TBB
26 | #define TBB_PREVIEW_RUNTIME_LOADER 1
27 | #include "tbb/runtime_loader.h"
28 | static char const * _path[] = { ".", NULL };
29 | // declaration must be placed before 1st TBB call
30 | static tbb::runtime_loader _runtime_loader( _path );
31 | #else // TEST_USES_TBB
32 | // if TBB library is not used, no need to test Runtime Loader
33 | #define HARNESS_SKIP_TEST 1
34 | #endif // TEST_USES_TBB
35 | #endif // HARNESS_USE_RUNTIME_LOADER
36 |
37 | #endif /* harness_runtime_loader_H */
38 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | //
22 | // Created by Xcode* 4.3.2
23 | //
24 |
25 | #import
26 |
27 | #if TARGET_OS_IPHONE
28 |
29 | #import
30 |
31 | @interface tbbAppDelegate : UIResponder
32 |
33 | @property (strong, nonatomic) UIWindow *window;
34 |
35 | @end
36 |
37 | #elif TARGET_OS_MAC
38 |
39 | #import
40 |
41 | @interface tbbAppDelegate : NSObject {
42 | __unsafe_unretained NSWindow *_window;
43 | }
44 |
45 | @property (assign) IBOutlet NSWindow *window;
46 |
47 | - (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender;
48 |
49 | @end
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore the debug and release directories created with Makefile builds #
2 | #########################################################################
3 | build/*_debug/
4 | build/*_release/
5 |
6 | # Compiled source #
7 | ###################
8 | *.com
9 | *.class
10 | *.dll
11 | *.lib
12 | *.pdb
13 | *.exe
14 | *.o
15 | *.so
16 | *.so.1
17 | *.so.2
18 | *.dylib
19 | *.a
20 | *.obj
21 | *.pyc
22 |
23 | *.orig
24 | *.raw
25 | *.sample
26 | *.slo
27 | *.swp
28 | *.config
29 | *.la
30 | *.lai
31 | *.lo
32 | *.nhdr
33 | *.nii.gz
34 | *.nrrd
35 |
36 | # Packages #
37 | ############
38 | # it's better to unpack these files and commit the raw source
39 | # git has its own built in compression methods
40 | *.7z
41 | *.dmg
42 | *.gz
43 | *.iso
44 | *.jar
45 | *.rar
46 | *.tar
47 | *.tgz
48 | *.zip
49 |
50 | # Logs and databases #
51 | ######################
52 | *.log
53 | *.sql
54 | *.sqlite
55 |
56 | # OS generated files #
57 | ######################
58 | .DS_Store
59 | .DS_Store?
60 | ._*
61 | .Spotlight-V100
62 | .Trashes
63 | ehthumbs.db
64 | Thumbs.db
65 |
66 | # IDE generated files #
67 | ######################
68 | /.ninja_deps
69 | /.ninja_log
70 | /build.ninja
71 | /rules.ninja
72 | *~
73 | .emacs.desktop
74 |
75 | # Build system generated files #
76 | ################################
77 | CMakeCache.txt
78 | CMakeFiles/
79 |
80 | # Other #
81 | #########
82 | .clang_complete
83 | .idea
84 | .svn
85 | crash*
86 | *.tmp
87 |
--------------------------------------------------------------------------------
/examples/graph/som/msvs/som.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "som", "som.vcxproj", "{B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Debug|Win32.Build.0 = Debug|Win32
18 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Debug|x64.ActiveCfg = Debug|x64
19 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Debug|x64.Build.0 = Debug|x64
20 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Release|Win32.ActiveCfg = Release|Win32
21 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Release|Win32.Build.0 = Release|Win32
22 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Release|x64.ActiveCfg = Release|x64
23 | {B2AE2EDC-697B-4C85-AC0D-E3E523D20D6D}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/graph/stereo/msvs/stereo.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stereo", "stereo.vcxproj", "{9C777D75-70FF-4C24-AB74-EBCDF3328AB9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Debug|Win32.Build.0 = Debug|Win32
18 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Debug|x64.ActiveCfg = Debug|x64
19 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Debug|x64.Build.0 = Debug|x64
20 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Release|Win32.ActiveCfg = Release|Win32
21 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Release|Win32.Build.0 = Release|Win32
22 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Release|x64.ActiveCfg = Release|x64
23 | {9C777D75-70FF-4C24-AB74-EBCDF3328AB9}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/graph/binpack/msvs/binpack.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binpack", "binpack.vcxproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32
18 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64
19 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64
20 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32
21 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32
22 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64
23 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/graph/fgbzip2/msvs/fgbzip2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fgbzip2", "fgbzip2.vcxproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32
18 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64
19 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64
20 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32
21 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32
22 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64
23 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/graph/matmult/msvs/matmult.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "matmult", "matmult.vcxproj", "{517E31A4-BEED-481A-A5A7-5B37B82A1C16}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|Win32.Build.0 = Debug|Win32
18 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|x64.ActiveCfg = Debug|x64
19 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Debug|x64.Build.0 = Debug|x64
20 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|Win32.ActiveCfg = Release|Win32
21 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|Win32.Build.0 = Release|Win32
22 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|x64.ActiveCfg = Release|x64
23 | {517E31A4-BEED-481A-A5A7-5B37B82A1C16}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/pipeline/square/msvs/square.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "square", "square.vcxproj", "{A21C0AEE-ADDC-45F0-A668-58FF10351D23}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.Build.0 = Debug|Win32
18 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.ActiveCfg = Debug|x64
19 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.Build.0 = Debug|x64
20 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.ActiveCfg = Release|Win32
21 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.Build.0 = Release|Win32
22 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.ActiveCfg = Release|x64
23 | {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/task/tree_sum/msvs/tree_sum.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tree_sum", "tree_sum.vcxproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32
18 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64
19 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64
20 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32
21 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32
22 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64
23 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/msvs/sudoku.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sudoku", "sudoku.vcxproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32
18 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64
19 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64
20 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32
21 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32
22 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64
23 | {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/common/examples-common.inc:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # detect if a compiler can support C++11
20 | # If CXX0XFLAGS already set, do not change it
21 | ifneq (,$(findstring $(CXX), icc icpc clang++))
22 | # every supported icc or clang is OK
23 | CXX0XFLAGS ?= -std=c++0x
24 | else
25 | ifneq (,$(findstring $(CXX), g++ gcc))
26 | ifneq (, $(strip $(shell $(CXX) -v 2>&1 | grep "clang-")))
27 | # This is clang actually,
28 | # every supported clang is OK
29 | CXX0XFLAGS ?= -std=c++0x
30 | else
31 | # support of lambda started GCC 4.5
32 | ifneq (, $(strip $(shell g++ -dumpversion | egrep "^(4\.[5-9]|[5-9])")))
33 | CXX0XFLAGS ?= -std=c++0x
34 | endif
35 | endif
36 | endif
37 | endif
38 |
39 |
--------------------------------------------------------------------------------
/examples/graph/cholesky/msvs/cholesky.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cholesky", "cholesky.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/graph/logic_sim/msvs/logic_sim.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logic_sim", "logic_sim.vcxproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|Win32.Build.0 = Debug|Win32
18 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|x64.ActiveCfg = Debug|x64
19 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|x64.Build.0 = Debug|x64
20 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|Win32.ActiveCfg = Release|Win32
21 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|Win32.Build.0 = Release|Win32
22 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|x64.ActiveCfg = Release|x64
23 | {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/parallel_reduce/primes/msvs/primes.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "primes", "primes.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/src/test/harness_mic.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef tbb_test_harness_mic_H
22 | #define tbb_test_harness_mic_H
23 |
24 | #if ! __TBB_DEFINE_MIC
25 | #error test/harness_mic.h should be included only when building for Intel(R) Many Integrated Core Architecture
26 | #endif
27 |
28 | // test for unifed sources. See makefiles
29 | #undef HARNESS_INCOMPLETE_SOURCES
30 |
31 | #include
32 | #include
33 |
34 | #define TBB_TEST_LOW_WORKLOAD 1
35 |
36 | #define REPORT_FATAL_ERROR REPORT
37 | #define HARNESS_EXPORT
38 |
39 | #if __TBB_MIC_NATIVE
40 | #define HARNESS_EXIT_ON_ASSERT 1
41 | #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1
42 | #else
43 | #define HARNESS_TERMINATE_ON_ASSERT 1
44 | #endif
45 |
46 | #endif /* tbb_test_harness_mic_H */
47 |
--------------------------------------------------------------------------------
/examples/test_all/fibonacci/msvs/fibonacci.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fibonacci", "fibonacci.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/concurrent_priority_queue/shortpath/msvs/shortpath.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shortpath", "shortpath.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/src/tbbmalloc/tbbmalloc_internal_api.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_tbbmalloc_internal_api_H
22 | #define __TBB_tbbmalloc_internal_api_H
23 |
24 | #ifdef __cplusplus
25 | extern "C" {
26 | #endif /* __cplusplus */
27 |
28 | typedef enum {
29 | /* Tune usage of source included allocator. Selected value is large enough
30 | to not intercept with constants from AllocationModeParam. */
31 | TBBMALLOC_INTERNAL_SOURCE_INCLUDED = 65536
32 | } AllocationModeInternalParam;
33 |
34 | void MallocInitializeITT();
35 | void __TBB_mallocProcessShutdownNotification(bool);
36 | #if _WIN32||_WIN64
37 | void __TBB_mallocThreadShutdownNotification();
38 | #endif
39 |
40 | #ifdef __cplusplus
41 | } /* extern "C" */
42 | #endif /* __cplusplus */
43 |
44 | #endif /* __TBB_tbbmalloc_internal_api_H */
45 |
--------------------------------------------------------------------------------
/examples/concurrent_hash_map/count_strings/msvs/count_strings.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "count_strings", "count_strings.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252C}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Tachyon Demo
6 | test
7 | Assets\StoreLogo.png
8 |
9 |
10 | 6.2.0
11 | 6.2.0
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/examples/graph/dining_philosophers/msvs/dining_philosophers.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dining_philosophers", "dining_philosophers.vcxproj", "{3894D1D2-A574-4937-AD56-726758EFE5B7}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|Win32.Build.0 = Debug|Win32
18 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|x64.ActiveCfg = Debug|x64
19 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|x64.Build.0 = Debug|x64
20 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|Win32.ActiveCfg = Release|Win32
21 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|Win32.Build.0 = Release|Win32
22 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|x64.ActiveCfg = Release|x64
23 | {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/examples/parallel_do/parallel_preorder/msvs/parallel_preorder.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.40629.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel_preorder", "parallel_preorder.vcxproj", "{3AA40693-F93D-4D4B-B32E-068F511A252B}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Win32 = Debug|Win32
11 | Debug|x64 = Debug|x64
12 | Release|Win32 = Release|Win32
13 | Release|x64 = Release|x64
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.ActiveCfg = Debug|Win32
17 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.Build.0 = Debug|Win32
18 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.ActiveCfg = Debug|x64
19 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.Build.0 = Debug|x64
20 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.ActiveCfg = Release|Win32
21 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.Build.0 = Release|Win32
22 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.ActiveCfg = Release|x64
23 | {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.Build.0 = Release|x64
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/src/tbb/ia64-gas/lock_byte.s:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2018 Intel Corporation
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | //
15 | //
16 | //
17 | //
18 |
19 | // Support for class TinyLock
20 | .section .text
21 | .align 16
22 | // unsigned int __TBB_machine_trylockbyte( byte& flag );
23 | // r32 = address of flag
24 | .proc __TBB_machine_trylockbyte#
25 | .global __TBB_machine_trylockbyte#
26 | ADDRESS_OF_FLAG=r32
27 | RETCODE=r8
28 | FLAG=r9
29 | BUSY=r10
30 | SCRATCH=r11
31 | __TBB_machine_trylockbyte:
32 | ld1.acq FLAG=[ADDRESS_OF_FLAG]
33 | mov BUSY=1
34 | mov RETCODE=0
35 | ;;
36 | cmp.ne p6,p0=0,FLAG
37 | mov ar.ccv=r0
38 | (p6) br.ret.sptk.many b0
39 | ;;
40 | cmpxchg1.acq SCRATCH=[ADDRESS_OF_FLAG],BUSY,ar.ccv // Try to acquire lock
41 | ;;
42 | cmp.eq p6,p0=0,SCRATCH
43 | ;;
44 | (p6) mov RETCODE=1
45 | br.ret.sptk.many b0
46 | .endp __TBB_machine_trylockbyte#
47 |
--------------------------------------------------------------------------------
/examples/parallel_reduce/primes/primes.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef PRIMES_H_
22 | #define PRIMES_H_
23 |
24 | #if __TBB_MIC_OFFLOAD
25 | #pragma offload_attribute (push,target(mic))
26 | #endif // __TBB_MIC_OFFLOAD
27 |
28 | #include "tbb/task_scheduler_init.h"
29 | #include
30 | typedef std::size_t NumberType;
31 |
32 | //! Count number of primes between 0 and n
33 | /** This is the serial version. */
34 | NumberType SerialCountPrimes( NumberType n);
35 |
36 | //! Count number of primes between 0 and n
37 | /** This is the parallel version. */
38 | NumberType ParallelCountPrimes( NumberType n, int numberOfThreads= tbb::task_scheduler_init::automatic, NumberType grainSize = 1000);
39 |
40 | #if __TBB_MIC_OFFLOAD
41 | #pragma offload_attribute (pop)
42 | #endif // __TBB_MIC_OFFLOAD
43 |
44 | #endif /* PRIMES_H_ */
45 |
--------------------------------------------------------------------------------
/examples/test_all/fibonacci/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=fibonacci
22 | ARGS=
23 |
24 | # The C++ compiler
25 | ifneq (,$(shell which icc 2>/dev/null))
26 | CXX=icc
27 | endif # icc
28 |
29 | ifeq ($(shell uname), Linux)
30 | ifeq ($(target), android)
31 | LIBS+= --sysroot=$(SYSROOT)
32 | run_cmd=../../common/android.linux.launcher.sh
33 | else
34 | LIBS+= -lrt
35 | endif
36 | else ifeq ($(shell uname), Darwin)
37 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
38 | endif
39 |
40 | all: release test
41 |
42 | release: *.cpp
43 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
44 |
45 | debug: *.cpp
46 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
47 |
48 | clean:
49 | $(RM) $(PROG) *.o *.d
50 |
51 | test:
52 | $(run_cmd) ./$(PROG) $(ARGS)
53 |
--------------------------------------------------------------------------------
/python/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | tbb_root?=..
20 | include $(tbb_root)/build/common.inc
21 | .PHONY: all release test install test-install
22 |
23 | export TBBROOT=$(abspath $(tbb_root))
24 | SRC=$(tbb_root)/python/*.py $(tbb_root)/python/tbb/*
25 | PY_SETUP=python $(tbb_root)/python/setup.py
26 |
27 | all: install test
28 |
29 | clean:
30 | $(PY_SETUP) clean -b$(CURDIR)
31 |
32 | release: CC=$(compiler)
33 | release: $(SRC) rml
34 | $(PY_SETUP) build -b$(CURDIR) -f check
35 |
36 | install: CC=$(compiler)
37 | install: $(SRC) rml
38 | $(PY_SETUP) build -b$(CURDIR) install
39 |
40 | test:
41 | python -m tbb test
42 |
43 | rml:
44 | ifeq (linux,$(tbb_os))
45 | $(MAKE) -C "$(work_dir)_release" -rf $(tbb_root)/python/rml/Makefile cfg=release rml
46 | rml_%:
47 | $(MAKE) -C "$(work_dir)_release" -rf $(tbb_root)/python/rml/Makefile cfg=release $(subst rml_,,$@)
48 | endif
49 |
--------------------------------------------------------------------------------
/examples/parallel_for/game_of_life/msvs/app.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 |
7 | /////////////////////////////////////////////////////////////////////////////
8 | #undef APSTUDIO_READONLY_SYMBOLS
9 |
10 | /////////////////////////////////////////////////////////////////////////////
11 | // English (U.S.) resources
12 |
13 |
14 | /////////////////////////////////////////////////////////////////////////////
15 | //
16 | // Icon
17 | //
18 |
19 | // Icon placed first or with lowest ID value becomes application icon
20 |
21 | LANGUAGE 9, 1
22 | #pragma code_page(1252)
23 | 1 ICON "app.ico"
24 |
25 | #ifdef APSTUDIO_INVOKED
26 | /////////////////////////////////////////////////////////////////////////////
27 | //
28 | // TEXTINCLUDE
29 | //
30 |
31 | 1 TEXTINCLUDE
32 | BEGIN
33 | "resource.h\0"
34 | "\0"
35 | END
36 |
37 | 2 TEXTINCLUDE
38 | BEGIN
39 | "#include ""afxres.h""\r\n"
40 | "\0"
41 | END
42 |
43 | 3 TEXTINCLUDE
44 | BEGIN
45 | "\0"
46 | END
47 |
48 | #endif // APSTUDIO_INVOKED
49 |
50 | /////////////////////////////////////////////////////////////////////////////
51 |
52 |
53 |
54 | #ifndef APSTUDIO_INVOKED
55 | /////////////////////////////////////////////////////////////////////////////
56 | //
57 | // Generated from the TEXTINCLUDE 3 resource.
58 | //
59 |
60 |
61 | /////////////////////////////////////////////////////////////////////////////
62 | #endif // not APSTUDIO_INVOKED
63 |
64 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/tbbExample-Info.ios.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | iOS
27 | UIMainStoryboardFile
28 | iOS
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 | UISupportedInterfaceOrientations~ipad
39 |
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/rml/client/rml_omp.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "rml_omp.h"
22 | #include "omp_dynamic_link.h"
23 | #include
24 |
25 | namespace __kmp {
26 | namespace rml {
27 |
28 | #define MAKE_SERVER(x) DLD(__KMP_make_rml_server,x)
29 | #define GET_INFO(x) DLD(__KMP_call_with_my_server_info,x)
30 | #define SERVER omp_server
31 | #define CLIENT omp_client
32 | #define FACTORY omp_factory
33 |
34 | #if __TBB_WEAK_SYMBOLS_PRESENT
35 | #pragma weak __KMP_make_rml_server
36 | #pragma weak __KMP_call_with_my_server_info
37 | extern "C" {
38 | omp_factory::status_type __KMP_make_rml_server( omp_factory& f, omp_server*& server, omp_client& client );
39 | void __KMP_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg );
40 | }
41 | #endif /* __TBB_WEAK_SYMBOLS_PRESENT */
42 |
43 | #include "rml_factory.h"
44 |
45 | } // rml
46 | } // __kmp
47 |
--------------------------------------------------------------------------------
/examples/graph/matmult/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 |
21 | run_cmd=
22 | PROG=matmult
23 | ARGS=
24 |
25 | # icpc by default
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icpc
28 | endif
29 |
30 | # autodetect C++11 support
31 | include ../../common/examples-common.inc
32 |
33 | ifeq ($(shell uname), Linux)
34 | LIBS+= -lrt -lpthread -lcilkrts
35 | else ifeq ($(shell uname), Darwin)
36 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
37 | endif
38 |
39 | all: release test
40 |
41 | release:
42 | $(CXX) -O2 -DNDEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb $(LIBS) $(CXX0XFLAGS)
43 |
44 | debug:
45 | $(CXX) -O0 -g -DTBB_USE_DEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb_debug $(LIBS) $(CXX0XFLAGS)
46 |
47 | clean:
48 | $(RM) $(PROG) *.o *.d
49 |
50 | test:
51 | $(run_cmd) ./$(PROG) $(ARGS)
52 |
53 | perf_build: release
54 |
55 | perf_run:
56 | $(run_cmd) ./$(PROG)
57 |
--------------------------------------------------------------------------------
/src/tbb/ia64-gas/log2.s:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2005-2018 Intel Corporation
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 | //
15 | //
16 | //
17 | //
18 |
19 | .section .text
20 | .align 16
21 | // unsigned long __TBB_machine_lg( unsigned long x );
22 | // r32 = x
23 | .proc __TBB_machine_lg#
24 | .global __TBB_machine_lg#
25 | __TBB_machine_lg:
26 | shr r16=r32,1 // .x
27 | ;;
28 | shr r17=r32,2 // ..x
29 | or r32=r32,r16 // xx
30 | ;;
31 | shr r16=r32,3 // ...xx
32 | or r32=r32,r17 // xxx
33 | ;;
34 | shr r17=r32,5 // .....xxx
35 | or r32=r32,r16 // xxxxx
36 | ;;
37 | shr r16=r32,8 // ........xxxxx
38 | or r32=r32,r17 // xxxxxxxx
39 | ;;
40 | shr r17=r32,13
41 | or r32=r32,r16 // 13x
42 | ;;
43 | shr r16=r32,21
44 | or r32=r32,r17 // 21x
45 | ;;
46 | shr r17=r32,34
47 | or r32=r32,r16 // 34x
48 | ;;
49 | shr r16=r32,55
50 | or r32=r32,r17 // 55x
51 | ;;
52 | or r32=r32,r16 // 64x
53 | ;;
54 | popcnt r8=r32
55 | ;;
56 | add r8=-1,r8
57 | br.ret.sptk.many b0
58 | .endp __TBB_machine_lg#
59 |
--------------------------------------------------------------------------------
/src/test/test_ScalableAllocator_STL.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | // Test whether scalable_allocator works with some of the host's STL containers.
22 |
23 | #define HARNESS_NO_PARSE_COMMAND_LINE 1
24 | #define __TBB_EXTRA_DEBUG 1 // enables additional checks
25 | #define TBB_PREVIEW_MEMORY_POOL 1
26 |
27 | #include "harness_assert.h"
28 | #include "tbb/memory_pool.h"
29 | #include "tbb/scalable_allocator.h"
30 |
31 | // The actual body of the test is there:
32 | #include "test_allocator_STL.h"
33 |
34 | int TestMain () {
35 | TestAllocatorWithSTL >();
36 | tbb::memory_pool > mpool;
37 | TestAllocatorWithSTL(tbb::memory_pool_allocator(mpool) );
38 | static char buf[1024*1024*4];
39 | tbb::fixed_pool fpool(buf, sizeof(buf));
40 | TestAllocatorWithSTL(tbb::memory_pool_allocator(fpool) );
41 | return Harness::Done;
42 | }
43 |
--------------------------------------------------------------------------------
/examples/parallel_for/polygon_overlay/msvs/pover.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 | /////////////////////////////////////////////////////////////////////////////
7 | //
8 | // Generated from the TEXTINCLUDE 2 resource.
9 | //
10 | #include "afxres.h"
11 |
12 | /////////////////////////////////////////////////////////////////////////////
13 | #undef APSTUDIO_READONLY_SYMBOLS
14 |
15 | /////////////////////////////////////////////////////////////////////////////
16 | // English (U.S.) resources
17 |
18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
19 | LANGUAGE 9, 1
20 | #pragma code_page(1252)
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""afxres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 | #endif // English (U.S.) resources
48 | /////////////////////////////////////////////////////////////////////////////
49 |
50 |
51 |
52 | #ifndef APSTUDIO_INVOKED
53 | /////////////////////////////////////////////////////////////////////////////
54 | //
55 | // Generated from the TEXTINCLUDE 3 resource.
56 | //
57 |
58 |
59 | /////////////////////////////////////////////////////////////////////////////
60 | #endif // not APSTUDIO_INVOKED
61 |
62 |
--------------------------------------------------------------------------------
/include/tbb/aligned_space.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_aligned_space_H
22 | #define __TBB_aligned_space_H
23 |
24 | #include "tbb_stddef.h"
25 | #include "tbb_machine.h"
26 |
27 | namespace tbb {
28 |
29 | //! Block of space aligned sufficiently to construct an array T with N elements.
30 | /** The elements are not constructed or destroyed by this class.
31 | @ingroup memory_allocation */
32 | template
33 | class aligned_space {
34 | private:
35 | typedef __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type;
36 | element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)];
37 | public:
38 | //! Pointer to beginning of array
39 | T* begin() const {return internal::punned_cast(this);}
40 |
41 | //! Pointer to one past last element in array.
42 | T* end() const {return begin()+N;}
43 | };
44 |
45 | } // namespace tbb
46 |
47 | #endif /* __TBB_aligned_space_H */
48 |
--------------------------------------------------------------------------------
/src/rml/client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Overview
4 |
5 | This directory has source code that must be statically linked into an RML client.
6 |
7 | Files
8 |
9 |
10 | - rml_factory.h
11 |
- Text shared by rml_omp.cpp and rml_tbb.cpp.
12 | This is not an ordinary include file, so it does not have an #ifndef guard.
13 |
14 |
15 | Specific to client=OpenMP
16 |
17 | - rml_omp.cpp
18 |
- Source file for OpenMP client.
19 | - omp_dynamic_link.h
20 | - omp_dynamic_link.cpp
21 |
- Source files for dynamic linking support.
22 | The code is the code from the TBB source directory, but adjusted so that it
23 | appears in namespace __kmp instead of namespace tbb::internal.
24 |
25 | Specific to client=TBB
26 |
27 | - rml_tbb.cpp
28 |
- Source file for TBB client. It uses the dynamic linking support from the TBB source directory.
29 |
30 |
31 |
32 | Up to parent directory
33 |
34 | Copyright © 2005-2018 Intel Corporation. All Rights Reserved.
35 |
36 | Intel is a registered trademark or trademark of Intel Corporation
37 | or its subsidiaries in the United States and other countries.
38 |
39 | * Other names and brands may be claimed as the property of others.
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/examples/graph/som/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=som
23 | ARGS=
24 | LIGHT_ARGS=4
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) ./som_graph.cpp ./som.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) ./som_graph.cpp ./som.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | light_test:
45 | $(PROG) $(LIGHT_ARGS)
46 |
47 |
--------------------------------------------------------------------------------
/examples/graph/binpack/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=binpack
22 | ARGS=4 N=1000
23 | PERF_RUN_ARGS=auto N=1000 silent
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # which icc
29 |
30 | ifeq ($(shell uname), Linux)
31 | ifeq ($(target), android)
32 | LIBS+= --sysroot=$(SYSROOT)
33 | run_cmd=../../common/android.linux.launcher.sh
34 | else
35 | LIBS+= -lrt
36 | endif
37 | else ifeq ($(shell uname), Darwin)
38 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
39 | endif
40 |
41 | all: release test
42 |
43 | release: *.cpp
44 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
45 |
46 | debug: *.cpp
47 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
48 |
49 | clean:
50 | $(RM) $(PROG) *.o *.d
51 |
52 | test:
53 | $(run_cmd) ./$(PROG) $(ARGS)
54 |
55 | perf_build: release
56 |
57 | perf_run:
58 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
59 |
--------------------------------------------------------------------------------
/examples/graph/cholesky/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=cholesky
22 | ARGS=4 2
23 |
24 | # The C++ compiler
25 | ifneq (,$(shell which icpc 2>/dev/null))
26 | CXX=icpc
27 | endif # which icpc
28 |
29 | ifeq ($(shell uname), Darwin)
30 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib -Wl,-rpath,$(MKLROOT)/lib
31 | # MKL support
32 | override MKL_LIBS += -lmkl_core -lmkl_sequential -lmkl_intel
33 | else
34 | ifeq ($(shell uname), Linux)
35 | LIBS+= -lrt
36 | endif
37 | # MKL support
38 | override MKL_LIBS += -lmkl_rt
39 | endif
40 |
41 | # C++0x support
42 | override CXXFLAGS += -std=c++0x
43 |
44 | all: release test
45 |
46 | release: *.cpp
47 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(MKL_LIBS) $(LIBS)
48 |
49 | debug: *.cpp
50 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(MKL_LIBS) $(LIBS)
51 |
52 | clean:
53 | $(RM) $(PROG) *.o *.d
54 |
55 | test:
56 | $(run_cmd) ./$(PROG) $(ARGS)
57 |
--------------------------------------------------------------------------------
/examples/graph/dining_philosophers/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=dining_philosophers
22 | ARGS= auto 5
23 | LIGHT_ARGS= auto 3
24 |
25 | ifneq (,$(shell which icc 2>/dev/null))
26 | CXX=icc
27 | endif # icc
28 |
29 | ifeq ($(shell uname), Linux)
30 | ifeq ($(target), android)
31 | LIBS+= --sysroot=$(SYSROOT)
32 | run_cmd=../../common/android.linux.launcher.sh
33 | else
34 | LIBS+= -lrt
35 | endif
36 | else ifeq ($(shell uname), Darwin)
37 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
38 | endif
39 |
40 | all: release test
41 |
42 | release: dining_philosophers.cpp
43 | $(CXX) -O2 -DNDEBUG -D_CONSOLE $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
44 |
45 | debug: dining_philosophers.cpp
46 | $(CXX) -O0 -D_CONSOLE -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
47 |
48 | clean:
49 | rm -f $(PROG) *.o *.d
50 |
51 | test:
52 | $(run_cmd) ./$(PROG) $(ARGS)
53 |
54 | light_test:
55 | $(run_cmd) ./$(PROG) $(LIGHT_ARGS)
56 |
--------------------------------------------------------------------------------
/examples/graph/fgbzip2/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 |
21 | run_cmd=
22 | PROG=fgbzip2
23 | ARGS=-b=9 -a=async_node $(PROG)
24 | PERF_RUN_ARGS=-b=9 -a=async_node $(PROG)
25 |
26 | # icpc by default
27 | ifneq (,$(shell which icc 2>/dev/null))
28 | CXX=icpc
29 | endif
30 |
31 | # autodetect C++11 support
32 | include ../../common/examples-common.inc
33 |
34 | ifeq ($(shell uname), Linux)
35 | LIBS+= -lrt -lpthread
36 | else ifeq ($(shell uname), Darwin)
37 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
38 | endif
39 |
40 | all: release test
41 |
42 | release:
43 | $(CXX) -O2 -DNDEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb $(LIBS) $(CXX0XFLAGS)
44 |
45 | debug:
46 | $(CXX) -O0 -g -DTBB_USE_DEBUG *.cpp $(CXXFLAGS) -o $(PROG) -ltbb_debug $(LIBS) $(CXX0XFLAGS)
47 |
48 | clean:
49 | $(RM) $(PROG) *.o *.d *.bz2
50 |
51 | test:
52 | $(run_cmd) ./$(PROG) $(ARGS)
53 |
54 | perf_build: release
55 |
56 | perf_run:
57 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
58 |
--------------------------------------------------------------------------------
/examples/parallel_for/seismic/seismic_video.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef SEISMIC_VIDEO_H_
22 | #define SEISMIC_VIDEO_H_
23 |
24 | #include "../../common/gui/video.h"
25 |
26 | class Universe;
27 |
28 | class SeismicVideo : public video
29 | {
30 | #ifdef _WINDOWS
31 | #define MAX_LOADSTRING 100
32 | TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
33 | WNDCLASSEX wcex;
34 | #endif
35 | static const char * const titles[2];
36 |
37 | bool initIsParallel ;
38 |
39 | Universe &u_;
40 | int numberOfFrames_; // 0 means forever, positive means number of frames, negative is undefined
41 | int threadsHigh;
42 | private:
43 | void on_mouse(int x, int y, int key);
44 | void on_process();
45 |
46 | #ifdef _WINDOWS
47 | public:
48 | #endif
49 | void on_key(int key);
50 |
51 | public:
52 | SeismicVideo( Universe &u,int numberOfFrames, int threadsHigh, bool initIsParallel=true);
53 | };
54 | #endif /* SEISMIC_VIDEO_H_ */
55 |
--------------------------------------------------------------------------------
/examples/concurrent_hash_map/count_strings/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=count_strings
22 | ARGS=
23 | PERF_RUN_ARGS=auto 10000000 silent
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # icc
29 |
30 | ifeq ($(shell uname), Linux)
31 | ifeq ($(target), android)
32 | LIBS+= --sysroot=$(SYSROOT)
33 | run_cmd=../../common/android.linux.launcher.sh
34 | else
35 | LIBS+= -lrt
36 | endif
37 | else ifeq ($(shell uname), Darwin)
38 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
39 | endif
40 |
41 | all: release test
42 |
43 | release: *.cpp
44 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
45 |
46 | debug: *.cpp
47 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
48 |
49 | clean:
50 | $(RM) $(PROG) *.o *.d
51 |
52 | test:
53 | $(run_cmd) ./$(PROG) $(ARGS)
54 |
55 | perf_build: release
56 |
57 | perf_run:
58 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
59 |
60 |
--------------------------------------------------------------------------------
/examples/graph/logic_sim/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=test_all
22 | ARGS=4
23 | PERF_RUN_ARGS=auto silent
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # which icc
29 |
30 | ifeq ($(shell uname), Linux)
31 | ifeq ($(target), android)
32 | LIBS+= --sysroot=$(SYSROOT)
33 | run_cmd=../../common/android.linux.launcher.sh
34 | else
35 | LIBS+= -lrt
36 | endif
37 | else ifeq ($(shell uname), Darwin)
38 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
39 | endif
40 |
41 | all: release test
42 |
43 | release: *.cpp
44 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $(PROG).cpp -std=c++0x -ltbb $(LIBS)
45 |
46 | debug: *.cpp
47 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $(PROG).cpp -std=c++0x -ltbb_debug $(LIBS)
48 | clean:
49 | $(RM) $(PROG) *.o *.d
50 |
51 | test:
52 | $(run_cmd) ./$(PROG) $(ARGS)
53 |
54 | perf_build: release
55 |
56 | perf_run:
57 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
58 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/OpenGLView.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #import
22 |
23 | #if TARGET_OS_IPHONE
24 |
25 | #import
26 | #import "OpenGLES/ES2/gl.h"
27 |
28 | @interface OpenGLView : UIView {
29 | NSTimer *timer;
30 | CGRect imageRect;
31 | }
32 |
33 | @property (nonatomic, retain) NSTimer *timer;
34 | @property (nonatomic) CGRect imageRect;
35 |
36 | - (void) drawRect:(CGRect)rect;
37 | - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
38 |
39 | @end
40 |
41 | #elif TARGET_OS_MAC
42 |
43 | #import
44 | #import
45 |
46 | @interface OpenGLView : NSOpenGLView{
47 | NSTimer *timer;
48 | }
49 |
50 | @property (nonatomic,retain) NSTimer *timer;
51 |
52 | - (void) drawRect:(NSRect)start;
53 | - (void) mouseDown:(NSEvent *)theEvent;
54 | - (void) keyDown:(NSEvent *)theEvent;
55 | - (BOOL) acceptsFirstResponder;
56 | - (void) viewDidEndLiveResize;
57 |
58 | @end
59 |
60 | #endif
61 |
--------------------------------------------------------------------------------
/examples/parallel_for/polygon_overlay/polymain.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "pover_global.h" // for declaration of DEFINE and INIT
22 |
23 | DEFINE Polygon_map_t *gPolymap1 INIT(0);
24 | DEFINE Polygon_map_t *gPolymap2 INIT(0);
25 | DEFINE Polygon_map_t *gResultMap INIT(0);
26 |
27 | extern void Usage(int argc, char **argv);
28 |
29 | extern bool ParseCmdLine(int argc, char **argv );
30 |
31 | extern bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, colorcomp_t maxR, colorcomp_t maxG, colorcomp_t maxB);
32 |
33 | extern bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh);
34 |
35 | extern void CheckPolygonMap(Polygon_map_t *checkMap);
36 |
37 | extern bool CompOnePolygon(RPolygon *p1, RPolygon *p2);
38 |
39 | extern bool PolygonsEqual(RPolygon *p1, RPolygon *p2);
40 |
41 | extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);
42 |
43 | extern void SetRandomSeed(int newSeed);
44 |
45 | extern int NextRan(int n);
46 |
--------------------------------------------------------------------------------
/src/rml/client/rml_tbb.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "../include/rml_tbb.h"
22 | #include "tbb/dynamic_link.h"
23 | #include
24 |
25 | namespace tbb {
26 | namespace internal {
27 | namespace rml {
28 |
29 | #define MAKE_SERVER(x) DLD(__TBB_make_rml_server,x)
30 | #define GET_INFO(x) DLD(__TBB_call_with_my_server_info,x)
31 | #define SERVER tbb_server
32 | #define CLIENT tbb_client
33 | #define FACTORY tbb_factory
34 |
35 | #if __TBB_WEAK_SYMBOLS_PRESENT
36 | #pragma weak __TBB_make_rml_server
37 | #pragma weak __TBB_call_with_my_server_info
38 | extern "C" {
39 | ::rml::factory::status_type __TBB_make_rml_server( tbb::internal::rml::tbb_factory& f, tbb::internal::rml::tbb_server*& server, tbb::internal::rml::tbb_client& client );
40 | void __TBB_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg );
41 | }
42 | #endif /* __TBB_WEAK_SYMBOLS_PRESENT */
43 |
44 | #include "rml_factory.h"
45 |
46 | } // rml
47 | } // internal
48 | } // tbb
49 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #import
22 | #import
23 |
24 | #if TARGET_OS_IPHONE
25 |
26 | #import
27 | #import "tbbAppDelegate.h"
28 |
29 | void get_screen_resolution(int *x, int *y) {
30 | // Getting landscape screen resolution in any case
31 | CGRect imageRect = [[UIScreen mainScreen] bounds];
32 | *x=imageRect.size.width>imageRect.size.height?imageRect.size.width:imageRect.size.height;
33 | *y=imageRect.size.width
46 |
47 | int cocoa_main(int argc, char *argv[])
48 | {
49 | return NSApplicationMain(argc, (const char **)argv);
50 | }
51 | #endif
52 |
--------------------------------------------------------------------------------
/examples/graph/dining_philosophers/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=dining_philosophers
23 | ARGS= auto 5
24 | LIGHT_ARGS= auto 3
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) ./dining_philosophers.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) ./dining_philosophers.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | light_test:
45 | $(PROG) $(LIGHT_ARGS)
46 |
47 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/tbbTachyonRenderer.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include
24 | #include "DirectXBase.h"
25 |
26 | ref class tbbTachyonRenderer sealed : public DirectXBase
27 | {
28 | public:
29 | tbbTachyonRenderer();
30 | virtual void CreateDeviceIndependentResources() override;
31 | virtual void CreateDeviceResources() override;
32 | virtual void CreateWindowSizeDependentResources() override;
33 | virtual void Render() override;
34 | void Update(float timeTotal, float timeDelta);
35 |
36 | void UpdateView(Windows::Foundation::Point deltaViewPosition);
37 |
38 | private:
39 | Microsoft::WRL::ComPtr m_Brush;
40 | Microsoft::WRL::ComPtr m_textFormat;
41 | Microsoft::WRL::ComPtr m_opacityBitmap;
42 | Microsoft::WRL::ComPtr m_textLayout;
43 | DWRITE_TEXT_METRICS m_textMetrics;
44 | bool m_renderNeeded;
45 | ~tbbTachyonRenderer();
46 | };
47 |
--------------------------------------------------------------------------------
/examples/pipeline/square/gen_input.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | #if _WIN32
26 | #include
27 | #ifndef F_OK
28 | #define F_OK 0
29 | #endif
30 | #define access _access
31 | #else
32 | #include
33 | #endif
34 |
35 | const long INPUT_SIZE = 1000000;
36 |
37 | //! Generates sample input for square.cpp
38 | void gen_input( const char *fname ) {
39 | long num = INPUT_SIZE;
40 | FILE *fptr = fopen(fname, "w");
41 | if(!fptr) {
42 | throw std::runtime_error("Could not open file for generating input");
43 | }
44 |
45 | int a=0;
46 | int b=1;
47 | for( long j=0; j/dev/null))
25 | CXX=icc
26 | endif # icc
27 |
28 | ifeq ($(shell uname), Linux)
29 | ifeq ($(target), android)
30 | LIBS+= --sysroot=$(SYSROOT)
31 | run_cmd=../../common/android.linux.launcher.sh
32 | else
33 | LIBS+= -lrt
34 | endif
35 | else ifeq ($(shell uname), Darwin)
36 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
37 | endif
38 |
39 | all: release test
40 |
41 | release: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp
42 | $(CXX) -O2 -DNDEBUG -D_CONSOLE $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
43 |
44 | debug: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp
45 | $(CXX) -O0 -D_CONSOLE -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
46 |
47 | clean:
48 | rm -f $(PROG) *.o *.d
49 |
50 | test:
51 | $(run_cmd) ./$(PROG) $(ARGS)
52 | light_test:
53 | $(run_cmd) ./$(PROG) $(LIGHT_ARGS)
54 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/DirectXPage.xaml.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #pragma once
22 |
23 | #include "DirectXPage.g.h"
24 | #include "tbbTachyonRenderer.h"
25 |
26 | namespace tbbTachyon
27 | {
28 | [Windows::Foundation::Metadata::WebHostHidden]
29 | public ref class DirectXPage sealed
30 | {
31 | public:
32 | DirectXPage();
33 |
34 | private:
35 | ~DirectXPage();
36 | void OnRendering(Object^ sender, Object^ args);
37 |
38 | Windows::Foundation::EventRegistrationToken m_eventToken;
39 |
40 | tbbTachyonRenderer^ m_renderer;
41 | bool m_renderNeeded;
42 | int m_number_of_threads;
43 |
44 | void ThreadsSliderValueChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::Primitives::RangeBaseValueChangedEventArgs^ e);
45 | void ThreadsApply_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
46 | void Exit_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
47 | };
48 | }
49 |
--------------------------------------------------------------------------------
/src/test/harness_assert.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | // Just the assertion portion of the harness.
22 | // This is useful for writing portions of tests that include
23 | // the minimal number of necessary header files.
24 | //
25 | // The full "harness.h" must be included later.
26 |
27 | #ifndef harness_assert_H
28 | #define harness_assert_H
29 |
30 | void ReportError( const char* filename, int line, const char* expression, const char* message);
31 | void ReportWarning( const char* filename, int line, const char* expression, const char* message);
32 |
33 | #define ASSERT_CUSTOM(p,message,file,line) ((p)?(void)0:ReportError(file,line,#p,message))
34 | #define ASSERT(p,message) ASSERT_CUSTOM(p,message,__FILE__,__LINE__)
35 | #define ASSERT_WARNING(p,message) ((p)?(void)0:ReportWarning(__FILE__,__LINE__,#p,message))
36 |
37 | //! Compile-time error if x and y have different types
38 | template
39 | void AssertSameType( const T& /*x*/, const T& /*y*/ ) {}
40 |
41 | #endif /* harness_assert_H */
42 |
--------------------------------------------------------------------------------
/cmake/tbb_config_generator.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2017-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | function(tbb_conf_gen_print_help)
20 | message("Usage: cmake -DTBB_ROOT= -DTBB_OS=Linux|Windows|Darwin [-DSAVE_TO=] -P tbb_config_generator.cmake")
21 | endfunction()
22 |
23 | if (NOT DEFINED TBB_ROOT)
24 | tbb_conf_gen_print_help()
25 | message(FATAL_ERROR "Required parameter TBB_ROOT is not defined")
26 | endif()
27 |
28 | if (NOT EXISTS "${TBB_ROOT}")
29 | tbb_conf_gen_print_help()
30 | message(FATAL_ERROR "TBB_ROOT=${TBB_ROOT} does not exist")
31 | endif()
32 |
33 | if (NOT DEFINED TBB_OS)
34 | tbb_conf_gen_print_help()
35 | message(FATAL_ERROR "Required parameter TBB_OS is not defined")
36 | endif()
37 |
38 | if (DEFINED SAVE_TO)
39 | set(tbb_conf_gen_save_to_param SAVE_TO ${SAVE_TO})
40 | endif()
41 |
42 | include(${CMAKE_CURRENT_LIST_DIR}/TBBMakeConfig.cmake)
43 | tbb_make_config(TBB_ROOT ${TBB_ROOT} CONFIG_DIR tbb_config_dir SYSTEM_NAME ${TBB_OS} ${tbb_conf_gen_save_to_param})
44 |
45 | message(STATUS "TBBConfig files were created in ${tbb_config_dir}")
46 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 |
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFile
12 |
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | 1
27 | LSApplicationCategoryType
28 | public.app-category.business
29 | LSEnvironment
30 |
31 | DYLD_LIBRARY_PATH
32 | Contents/Resources:.:../Resources:/tmp:$DYLD_LIBRARY_PATH
33 | LIBRARY_PATH
34 | Contents/Resources:.:../:/tmp:$DYLD_LIBRARY_PATH
35 |
36 | LSMinimumSystemVersion
37 | ${MACOSX_DEPLOYMENT_TARGET}
38 | NSHumanReadableCopyright
39 | Copyright 2005-2018 Intel Corporation. All Rights Reserved.
40 | NSMainNibFile
41 | MainMenu
42 | NSPrincipalClass
43 | NSApplication
44 |
45 |
46 |
--------------------------------------------------------------------------------
/examples/task/tree_sum/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=tree_sum
22 | ARGS=
23 | PERF_RUN_ARGS=auto 100000000 silent
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # icc
29 |
30 | ifeq ($(shell uname), Linux)
31 | ifeq ($(target), android)
32 | LIBS+= --sysroot=$(SYSROOT)
33 | run_cmd=../../common/android.linux.launcher.sh
34 | else
35 | LIBS+= -lrt
36 | endif
37 | else ifeq ($(shell uname), Darwin)
38 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
39 | endif
40 |
41 | all: release test
42 |
43 | release: *.cpp
44 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc -ltbb $(LIBS)
45 |
46 | debug: *.cpp
47 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc_debug -ltbb_debug $(LIBS)
48 |
49 | clean:
50 | $(RM) $(PROG) *.o *.d
51 |
52 | test:
53 | $(run_cmd) ./$(PROG) $(ARGS)
54 | $(run_cmd) ./$(PROG) stdmalloc $(ARGS)
55 |
56 | perf_build: release
57 |
58 | perf_run:
59 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
60 |
--------------------------------------------------------------------------------
/examples/graph/matmult/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | run_cmd=
23 | PROG=matmult
24 | ARGS=
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /wd4267 /wd4244
33 | MYLDFLAGS = /INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 |
37 | release:
38 | $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
39 |
40 | debug:
41 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
42 |
43 | clean:
44 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
45 |
46 | test:
47 | $(PROG) $(ARGS)
48 |
49 | perf_build: release
50 |
51 | perf_run:
52 | $(PROG) $(PERF_RUN_ARGS)
53 |
54 |
--------------------------------------------------------------------------------
/src/tbbmalloc/win32-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | EXPORTS
20 |
21 | ; frontend.cpp
22 | scalable_calloc
23 | scalable_free
24 | scalable_malloc
25 | scalable_realloc
26 | scalable_posix_memalign
27 | scalable_aligned_malloc
28 | scalable_aligned_realloc
29 | scalable_aligned_free
30 | scalable_msize
31 | scalable_allocation_mode
32 | scalable_allocation_command
33 | __TBB_malloc_safer_free
34 | __TBB_malloc_safer_realloc
35 | __TBB_malloc_safer_msize
36 | __TBB_malloc_safer_aligned_msize
37 | __TBB_malloc_safer_aligned_realloc
38 | ?pool_create@rml@@YAPAVMemoryPool@1@HPBUMemPoolPolicy@1@@Z
39 | ?pool_create_v1@rml@@YA?AW4MemPoolError@1@HPBUMemPoolPolicy@1@PAPAVMemoryPool@1@@Z
40 | ?pool_destroy@rml@@YA_NPAVMemoryPool@1@@Z
41 | ?pool_malloc@rml@@YAPAXPAVMemoryPool@1@I@Z
42 | ?pool_free@rml@@YA_NPAVMemoryPool@1@PAX@Z
43 | ?pool_reset@rml@@YA_NPAVMemoryPool@1@@Z
44 | ?pool_realloc@rml@@YAPAXPAVMemoryPool@1@PAXI@Z
45 | ?pool_aligned_realloc@rml@@YAPAXPAVMemoryPool@1@PAXII@Z
46 | ?pool_aligned_malloc@rml@@YAPAXPAVMemoryPool@1@II@Z
47 | ?pool_identify@rml@@YAPAVMemoryPool@1@PAX@Z
48 |
--------------------------------------------------------------------------------
/src/tbb/tools_api/disable_warnings.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "ittnotify_config.h"
22 |
23 | #if ITT_PLATFORM==ITT_PLATFORM_WIN
24 |
25 | #pragma warning (disable: 593) /* parameter "XXXX" was set but never used */
26 | #pragma warning (disable: 344) /* typedef name has already been declared (with same type) */
27 | #pragma warning (disable: 174) /* expression has no effect */
28 | #pragma warning (disable: 4127) /* conditional expression is constant */
29 | #pragma warning (disable: 4306) /* conversion from '?' to '?' of greater size */
30 |
31 | #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */
32 |
33 | #if defined __INTEL_COMPILER
34 |
35 | #pragma warning (disable: 869) /* parameter "XXXXX" was never referenced */
36 | #pragma warning (disable: 1418) /* external function definition with no prior declaration */
37 | #pragma warning (disable: 1419) /* external declaration in primary source file */
38 |
39 | #endif /* __INTEL_COMPILER */
40 |
--------------------------------------------------------------------------------
/src/tbbmalloc/mac32-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | _scalable_calloc
22 | _scalable_free
23 | _scalable_malloc
24 | _scalable_realloc
25 | _scalable_posix_memalign
26 | _scalable_aligned_malloc
27 | _scalable_aligned_realloc
28 | _scalable_aligned_free
29 | _scalable_msize
30 | _scalable_allocation_mode
31 | _scalable_allocation_command
32 | ___TBB_malloc_safer_aligned_msize
33 | ___TBB_malloc_safer_aligned_realloc
34 | ___TBB_malloc_safer_free
35 | ___TBB_malloc_safer_msize
36 | ___TBB_malloc_safer_realloc
37 | ___TBB_malloc_free_definite_size
38 | /* memory pool stuff */
39 | __ZN3rml11pool_createElPKNS_13MemPoolPolicyE
40 | __ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE
41 | __ZN3rml10pool_resetEPNS_10MemoryPoolE
42 | __ZN3rml12pool_destroyEPNS_10MemoryPoolE
43 | __ZN3rml11pool_mallocEPNS_10MemoryPoolEm
44 | __ZN3rml9pool_freeEPNS_10MemoryPoolEPv
45 | __ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm
46 | __ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm
47 | __ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm
48 | __ZN3rml13pool_identifyEPv
49 |
--------------------------------------------------------------------------------
/src/tbbmalloc/mac64-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | _scalable_calloc
22 | _scalable_free
23 | _scalable_malloc
24 | _scalable_realloc
25 | _scalable_posix_memalign
26 | _scalable_aligned_malloc
27 | _scalable_aligned_realloc
28 | _scalable_aligned_free
29 | _scalable_msize
30 | _scalable_allocation_mode
31 | _scalable_allocation_command
32 | ___TBB_malloc_safer_aligned_msize
33 | ___TBB_malloc_safer_aligned_realloc
34 | ___TBB_malloc_safer_free
35 | ___TBB_malloc_safer_msize
36 | ___TBB_malloc_safer_realloc
37 | ___TBB_malloc_free_definite_size
38 | /* memory pool stuff */
39 | __ZN3rml11pool_createElPKNS_13MemPoolPolicyE
40 | __ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE
41 | __ZN3rml10pool_resetEPNS_10MemoryPoolE
42 | __ZN3rml12pool_destroyEPNS_10MemoryPoolE
43 | __ZN3rml11pool_mallocEPNS_10MemoryPoolEm
44 | __ZN3rml9pool_freeEPNS_10MemoryPoolEPv
45 | __ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm
46 | __ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm
47 | __ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm
48 | __ZN3rml13pool_identifyEPv
49 |
--------------------------------------------------------------------------------
/src/tbbmalloc/win32-gcc-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | scalable_calloc;
24 | scalable_free;
25 | scalable_malloc;
26 | scalable_realloc;
27 | scalable_posix_memalign;
28 | scalable_aligned_malloc;
29 | scalable_aligned_realloc;
30 | scalable_aligned_free;
31 | scalable_msize;
32 | scalable_allocation_mode;
33 | scalable_allocation_command;
34 | __TBB_malloc_safer_free;
35 | __TBB_malloc_safer_realloc;
36 | __TBB_malloc_safer_msize;
37 | __TBB_malloc_safer_aligned_msize;
38 | __TBB_malloc_safer_aligned_realloc;
39 | /* memory pool stuff */
40 | _ZN3rml10pool_resetEPNS_10MemoryPoolE;
41 | _ZN3rml11pool_createEiPKNS_13MemPoolPolicyE;
42 | _ZN3rml14pool_create_v1EiPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE;
43 | _ZN3rml11pool_mallocEPNS_10MemoryPoolEj;
44 | _ZN3rml12pool_destroyEPNS_10MemoryPoolE;
45 | _ZN3rml9pool_freeEPNS_10MemoryPoolEPv;
46 | _ZN3rml12pool_reallocEPNS_10MemoryPoolEPvj;
47 | _ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvjj;
48 | _ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEjj;
49 | _ZN3rml13pool_identifyEPv;
50 |
51 | local:*;
52 | };
53 |
--------------------------------------------------------------------------------
/src/tbbmalloc/win64-gcc-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | {
22 | global:
23 | scalable_calloc;
24 | scalable_free;
25 | scalable_malloc;
26 | scalable_realloc;
27 | scalable_posix_memalign;
28 | scalable_aligned_malloc;
29 | scalable_aligned_realloc;
30 | scalable_aligned_free;
31 | scalable_msize;
32 | scalable_allocation_mode;
33 | scalable_allocation_command;
34 | __TBB_malloc_safer_free;
35 | __TBB_malloc_safer_realloc;
36 | __TBB_malloc_safer_msize;
37 | __TBB_malloc_safer_aligned_msize;
38 | __TBB_malloc_safer_aligned_realloc;
39 | /* memory pool stuff */
40 | _ZN3rml10pool_resetEPNS_10MemoryPoolE;
41 | _ZN3rml11pool_createExPKNS_13MemPoolPolicyE;
42 | _ZN3rml14pool_create_v1ExPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE;
43 | _ZN3rml11pool_mallocEPNS_10MemoryPoolEy;
44 | _ZN3rml12pool_destroyEPNS_10MemoryPoolE;
45 | _ZN3rml9pool_freeEPNS_10MemoryPoolEPv;
46 | _ZN3rml12pool_reallocEPNS_10MemoryPoolEPvy;
47 | _ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvyy;
48 | _ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEyy;
49 | _ZN3rml13pool_identifyEPv;
50 |
51 | local:*;
52 | };
53 |
--------------------------------------------------------------------------------
/examples/parallel_for/game_of_life/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=game_of_life
23 | ARGS=2:4 -t 5
24 | LIGHT_ARGS=1:2 -t 5
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | light_test:
45 | $(PROG) $(LIGHT_ARGS)
46 |
47 |
--------------------------------------------------------------------------------
/examples/parallel_do/parallel_preorder/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=parallel_preorder
22 | ARGS=
23 | PERF_RUN_ARGS=auto silent 500000 100
24 | LIGHT_ARGS=1:auto:+4 n-of-traversals=50
25 |
26 | # The C++ compiler
27 | ifneq (,$(shell which icc 2>/dev/null))
28 | CXX=icc
29 | endif # icc
30 |
31 | ifeq ($(shell uname), Linux)
32 | ifeq ($(target), android)
33 | LIBS+= --sysroot=$(SYSROOT)
34 | run_cmd=../../common/android.linux.launcher.sh
35 | else
36 | LIBS+= -lrt
37 | endif
38 | else ifeq ($(shell uname), Darwin)
39 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
40 | endif
41 |
42 | all: release test
43 |
44 | release: *.cpp
45 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
46 |
47 | debug: *.cpp
48 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
49 |
50 | clean:
51 | $(RM) $(PROG) *.o *.d
52 |
53 | test:
54 | $(run_cmd) ./$(PROG) $(ARGS)
55 |
56 | light_test:
57 | $(run_cmd) ./$(PROG) $(LIGHT_ARGS)
58 |
59 | perf_build: release
60 |
61 | perf_run:
62 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
63 |
64 |
--------------------------------------------------------------------------------
/include/tbb/compat/thread:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_thread_H
22 | #define __TBB_thread_H
23 |
24 | #include "../tbb_config.h"
25 |
26 | #if TBB_IMPLEMENT_CPP0X
27 |
28 | #include "../tbb_thread.h"
29 |
30 | namespace std {
31 |
32 | typedef tbb::tbb_thread thread;
33 |
34 | namespace this_thread {
35 | using tbb::this_tbb_thread::get_id;
36 | using tbb::this_tbb_thread::yield;
37 |
38 | inline void sleep_for(const tbb::tick_count::interval_t& rel_time) {
39 | tbb::internal::thread_sleep_v3( rel_time );
40 | }
41 | }
42 |
43 | } // namespace std
44 |
45 | #else /* TBB_IMPLEMENT_CPP0X */
46 |
47 | #define __TBB_COMPAT_THREAD_RECURSION_PROTECTOR 1
48 | #include
49 | #undef __TBB_COMPAT_THREAD_RECURSION_PROTECTOR
50 |
51 | #endif /* TBB_IMPLEMENT_CPP0X */
52 |
53 | #else /* __TBB_thread_H */
54 |
55 | #if __TBB_COMPAT_THREAD_RECURSION_PROTECTOR
56 | #error The tbb/compat/thread header attempts to include itself. \
57 | Please make sure that {TBBROOT}/include/tbb/compat is NOT in include paths.
58 | #endif
59 |
60 | #endif /* __TBB_thread_H */
61 |
--------------------------------------------------------------------------------
/src/test/test_handle_perror.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | // Program for basic correctness of handle_perror, which is internal
22 | // to the TBB shared library.
23 |
24 | #include
25 | #include
26 |
27 | #include "../tbb/tbb_misc.h"
28 | #include "harness.h"
29 |
30 | #if TBB_USE_EXCEPTIONS
31 |
32 | static void TestHandlePerror() {
33 | bool caught = false;
34 | try {
35 | tbb::internal::handle_perror( EAGAIN, "apple" );
36 | } catch( std::runtime_error& e ) {
37 | #if TBB_USE_EXCEPTIONS
38 | REMARK("caught runtime_exception('%s')\n",e.what());
39 | ASSERT( memcmp(e.what(),"apple: ",7)==0, NULL );
40 | ASSERT( strlen(strstr(e.what(), strerror(EAGAIN))), "bad error message?" );
41 | #endif /* TBB_USE_EXCEPTIONS */
42 | caught = true;
43 | }
44 | ASSERT( caught, NULL );
45 | }
46 |
47 | int TestMain () {
48 | TestHandlePerror();
49 | return Harness::Done;
50 | }
51 |
52 | #else /* !TBB_USE_EXCEPTIONS */
53 |
54 | int TestMain () {
55 | return Harness::Skipped;
56 | }
57 |
58 | #endif /* TBB_USE_EXCEPTIONS */
59 |
--------------------------------------------------------------------------------
/examples/graph/logic_sim/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 | PROG=test_all
21 | ARGS=4
22 | PERF_RUN_ARGS=auto silent
23 |
24 | # Try to find icl.exe
25 | CXX1 = $(TBB_CXX)-
26 | CXX2 = $(CXX1:icl.exe-=icl.exe)
27 | CXX = $(CXX2:-=cl.exe)
28 |
29 | # The C++ compiler options
30 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
31 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
32 |
33 | all: release test
34 |
35 | release: *.cpp
36 | $(CXX) $(PROG).cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
37 |
38 | debug: *.cpp
39 | $(CXX) $(PROG).cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 |
41 | clean:
42 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
43 |
44 | test:
45 | $(PROG) $(ARGS)
46 |
47 | compiler_check:
48 | @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
49 |
50 | perf_build: release
51 |
52 | perf_run:
53 | $(PROG) $(PERF_RUN_ARGS)
54 |
--------------------------------------------------------------------------------
/src/tbbmalloc/win64-tbbmalloc-export.def:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | EXPORTS
20 |
21 | ; frontend.cpp
22 | scalable_calloc
23 | scalable_free
24 | scalable_malloc
25 | scalable_realloc
26 | scalable_posix_memalign
27 | scalable_aligned_malloc
28 | scalable_aligned_realloc
29 | scalable_aligned_free
30 | scalable_msize
31 | scalable_allocation_mode
32 | scalable_allocation_command
33 | __TBB_malloc_safer_free
34 | __TBB_malloc_safer_realloc
35 | __TBB_malloc_safer_msize
36 | __TBB_malloc_safer_aligned_msize
37 | __TBB_malloc_safer_aligned_realloc
38 | ; memory pool stuff
39 | ?pool_create@rml@@YAPEAVMemoryPool@1@_JPEBUMemPoolPolicy@1@@Z
40 | ?pool_create_v1@rml@@YA?AW4MemPoolError@1@_JPEBUMemPoolPolicy@1@PEAPEAVMemoryPool@1@@Z
41 | ?pool_destroy@rml@@YA_NPEAVMemoryPool@1@@Z
42 | ?pool_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K@Z
43 | ?pool_free@rml@@YA_NPEAVMemoryPool@1@PEAX@Z
44 | ?pool_reset@rml@@YA_NPEAVMemoryPool@1@@Z
45 | ?pool_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K@Z
46 | ?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z
47 | ?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z
48 | ?pool_identify@rml@@YAPEAVMemoryPool@1@PEAX@Z
49 |
--------------------------------------------------------------------------------
/examples/test_all/fibonacci/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=Fibonacci
23 | ARGS=
24 |
25 | # Trying to find if icl.exe is set
26 | CXX1 = $(TBB_CXX)-
27 | CXX2 = $(CXX1:icl.exe-=icl.exe)
28 | CXX = $(CXX2:-=cl.exe)
29 |
30 | # The C++ compiler options
31 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _WIN32_WINNT=0x0501 $(CXXFLAGS)
32 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
33 |
34 | all: release test
35 | release: compiler_check
36 | $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
37 | debug: compiler_check
38 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
39 | clean:
40 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
41 | test:
42 | $(PROG) $(ARGS)
43 | compiler_check:
44 | @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
45 | @cmd.exe /C del compiler_test
46 |
--------------------------------------------------------------------------------
/examples/graph/fgbzip2/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | run_cmd=
23 | PROG=fgbzip2
24 | ARGS=-b=9 -a=async_node $(PROG).exe
25 | PERF_RUN_ARGS=-b=9 -a=async_node $(PROG).exe
26 |
27 | # Trying to find if icl.exe is set
28 | CXX1 = $(TBB_CXX)-
29 | CXX2 = $(CXX1:icl.exe-=icl.exe)
30 | CXX = $(CXX2:-=cl.exe)
31 |
32 | # The C++ compiler options
33 | MYCXXFLAGS = /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_WARNINGS /D _CRT_NONSTDC_NO_DEPRECATE /wd4267 /wd4244
34 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
35 |
36 | all: release test
37 |
38 | release:
39 | $(CXX) *.cpp /MD /O2 /Zi /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 |
41 | debug:
42 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
43 |
44 | clean:
45 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest *.bz2
46 |
47 | test:
48 | $(PROG) $(ARGS)
49 |
50 | perf_build: release
51 |
52 | perf_run:
53 | $(PROG) $(PERF_RUN_ARGS)
54 |
55 |
--------------------------------------------------------------------------------
/examples/graph/binpack/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=binpack
23 | ARGS= 4 N=1000
24 | PERF_RUN_ARGS=auto N=1000 silent
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | compiler_check:
45 | @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
46 |
47 | perf_build: release
48 |
49 | perf_run:
50 | $(PROG) $(PERF_RUN_ARGS)
51 |
--------------------------------------------------------------------------------
/include/tbb/flow_graph_abstractions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_flow_graph_abstractions_H
22 | #define __TBB_flow_graph_abstractions_H
23 |
24 | namespace tbb {
25 | namespace flow {
26 | namespace interface10 {
27 |
28 | //! Pure virtual template classes that define interfaces for async communication
29 | class graph_proxy {
30 | public:
31 | //! Inform a graph that messages may come from outside, to prevent premature graph completion
32 | virtual void reserve_wait() = 0;
33 |
34 | //! Inform a graph that a previous call to reserve_wait is no longer in effect
35 | virtual void release_wait() = 0;
36 |
37 | virtual ~graph_proxy() {}
38 | };
39 |
40 | template
41 | class receiver_gateway : public graph_proxy {
42 | public:
43 | //! Type of inputing data into FG.
44 | typedef Input input_type;
45 |
46 | //! Submit signal from an asynchronous activity to FG.
47 | virtual bool try_put(const input_type&) = 0;
48 | };
49 |
50 | } //interfaceX
51 |
52 | using interface10::graph_proxy;
53 | using interface10::receiver_gateway;
54 |
55 | } //flow
56 | } //tbb
57 | #endif
58 |
--------------------------------------------------------------------------------
/examples/concurrent_priority_queue/shortpath/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=shortpath
22 | ARGS=4 N=1000 start=0 end=999 verbose
23 | PERF_RUN_ARGS=auto N=1000 start=0 end=99 silent
24 |
25 | # icpc by default
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icpc
28 | endif
29 |
30 | # autodetect C++11 support
31 | include ../../common/examples-common.inc
32 |
33 | ifeq ($(shell uname), Linux)
34 | ifeq ($(target), android)
35 | LIBS+= --sysroot=$(SYSROOT)
36 | run_cmd=../../common/android.linux.launcher.sh
37 | else
38 | LIBS+= -lrt
39 | endif
40 | else ifeq ($(shell uname), Darwin)
41 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
42 | endif
43 |
44 | all: release test
45 |
46 | release: *.cpp
47 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) $(CXX0XFLAGS)
48 |
49 | debug: *.cpp
50 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) $(CXX0XFLAGS)
51 |
52 | clean:
53 | $(RM) $(PROG) *.o *.d
54 |
55 | test:
56 | $(run_cmd) ./$(PROG) $(ARGS)
57 |
58 | perf_build: release
59 |
60 | perf_run:
61 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
62 |
--------------------------------------------------------------------------------
/examples/task_group/sudoku/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=sudoku
23 | ARGS= 4 input1 verbose
24 | PERF_RUN_ARGS=auto input1 silent
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | compiler_check:
45 | @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
46 |
47 | perf_build: release
48 |
49 | perf_run:
50 | $(PROG) $(PERF_RUN_ARGS)
51 |
--------------------------------------------------------------------------------
/examples/pipeline/square/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=square
22 | ARGS=0 input.txt output.txt
23 | PERF_RUN_ARGS=auto input.txt output.txt silent
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # icc
29 |
30 | SOURCES = square.cpp gen_input.cpp
31 |
32 | ifeq ($(shell uname), Linux)
33 | ifeq ($(target), android)
34 | LIBS+= --sysroot=$(SYSROOT)
35 | run_cmd=../../common/android.linux.launcher.sh
36 | else
37 | LIBS+= -lrt
38 | endif
39 | else ifeq ($(shell uname), Darwin)
40 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
41 | endif
42 |
43 | all: release test
44 |
45 | release: $(SOURCES)
46 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
47 |
48 | debug: $(SOURCES)
49 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS)
50 |
51 | clean:
52 | $(RM) $(PROG) *.o *.d input.txt output.txt
53 |
54 | test:
55 | $(run_cmd) ./$(PROG) $(ARGS)
56 |
57 | perf_build: $(SOURCES)
58 | $(CXX) -O2 -msse2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS)
59 |
60 | perf_run:
61 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
62 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/iOS.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/tbb/intel64-masm/atomic_support.asm:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2005-2018 Intel Corporation
2 | ;
3 | ; Licensed under the Apache License, Version 2.0 (the "License");
4 | ; you may not use this file except in compliance with the License.
5 | ; You may obtain a copy of the License at
6 | ;
7 | ; http://www.apache.org/licenses/LICENSE-2.0
8 | ;
9 | ; Unless required by applicable law or agreed to in writing, software
10 | ; distributed under the License is distributed on an "AS IS" BASIS,
11 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | ; See the License for the specific language governing permissions and
13 | ; limitations under the License.
14 | ;
15 | ;
16 | ;
17 | ;
18 |
19 | ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE
20 | .code
21 | ALIGN 8
22 | PUBLIC __TBB_machine_fetchadd1
23 | __TBB_machine_fetchadd1:
24 | mov rax,rdx
25 | lock xadd [rcx],al
26 | ret
27 | .code
28 | ALIGN 8
29 | PUBLIC __TBB_machine_fetchstore1
30 | __TBB_machine_fetchstore1:
31 | mov rax,rdx
32 | lock xchg [rcx],al
33 | ret
34 | .code
35 | ALIGN 8
36 | PUBLIC __TBB_machine_cmpswp1
37 | __TBB_machine_cmpswp1:
38 | mov rax,r8
39 | lock cmpxchg [rcx],dl
40 | ret
41 | .code
42 | ALIGN 8
43 | PUBLIC __TBB_machine_fetchadd2
44 | __TBB_machine_fetchadd2:
45 | mov rax,rdx
46 | lock xadd [rcx],ax
47 | ret
48 | .code
49 | ALIGN 8
50 | PUBLIC __TBB_machine_fetchstore2
51 | __TBB_machine_fetchstore2:
52 | mov rax,rdx
53 | lock xchg [rcx],ax
54 | ret
55 | .code
56 | ALIGN 8
57 | PUBLIC __TBB_machine_cmpswp2
58 | __TBB_machine_cmpswp2:
59 | mov rax,r8
60 | lock cmpxchg [rcx],dx
61 | ret
62 | .code
63 | ALIGN 8
64 | PUBLIC __TBB_machine_pause
65 | __TBB_machine_pause:
66 | L1:
67 | dw 090f3H; pause
68 | add ecx,-1
69 | jne L1
70 | ret
71 | end
72 |
73 |
--------------------------------------------------------------------------------
/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #import "tbbAppDelegate.h"
22 |
23 | #if TARGET_OS_IPHONE
24 |
25 | @implementation tbbAppDelegate
26 |
27 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
28 | {
29 | return YES;
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | exit(EXIT_SUCCESS);
35 | }
36 |
37 | @end
38 |
39 | #elif TARGET_OS_MAC
40 |
41 | @implementation tbbAppDelegate
42 |
43 | @synthesize window = _window;
44 |
45 | //declared in macvideo.cpp file
46 | extern int g_sizex, g_sizey;
47 |
48 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
49 | {
50 | // Insert code here to initialize your application
51 | NSRect windowSize;
52 | windowSize.size.height = g_sizey;
53 | windowSize.size.width = g_sizex;
54 | windowSize.origin=_window.frame.origin;
55 | [_window setFrame:windowSize display:YES];
56 |
57 | }
58 |
59 | - (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender
60 | {
61 | return YES;
62 | }
63 |
64 | @end
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/examples/graph/som/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | NAME=som
21 | EXE=$(NAME).exe
22 | ARGS=
23 | LIGHT_ARGS=4
24 |
25 | # The C++ compiler
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icc
28 | endif # icc
29 |
30 | override CXXFLAGS += $(UI_CXXFLAGS)
31 |
32 | SRCFILES = som_graph.cpp som.cpp
33 |
34 | ifeq ($(shell uname), Linux)
35 | LIBS+= -lrt
36 | else ifeq ($(shell uname), Darwin)
37 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
38 | endif
39 |
40 | all: release test
41 |
42 | release: $(SRCFILES)
43 | ifeq ($(compiler),xl)
44 | # Avoiding "1586-346 (U) An error occurred during code generation. The code generation return code was 40." with -O3.
45 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb -ltbbmalloc $(LIBS)
46 | else
47 | $(CXX) -O3 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb -ltbbmalloc $(LIBS)
48 | endif
49 |
50 | debug: $(SRCFILES)
51 | $(CXX) -g -O0 -DTBB_USE_DEBUG -D_DEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb_debug -ltbbmalloc_debug $(LIBS)
52 |
53 | clean:
54 | $(RM) $(EXE) *.o *.d
55 |
56 | test:
57 | $(run_cmd) ./$(EXE) $(ARGS)
58 |
59 | light_test:
60 | $(run_cmd) ./$(EXE) $(LIGHT_ARGS)
61 |
--------------------------------------------------------------------------------
/examples/concurrent_priority_queue/shortpath/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=shortpath
23 | ARGS=4 N=1000 start=0 end=999 verbose
24 | PERF_RUN_ARGS=auto N=1000 start=0 end=99 silent
25 |
26 | # Trying to find if icl.exe is set
27 | CXX1 = $(TBB_CXX)-
28 | CXX2 = $(CXX1:icl.exe-=icl.exe)
29 | CXX = $(CXX2:-=cl.exe)
30 |
31 | # The C++ compiler options
32 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS)
33 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
34 |
35 | all: release test
36 | release:
37 | $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
38 | debug:
39 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
40 | clean:
41 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
42 | test:
43 | $(PROG) $(ARGS)
44 | compiler_check:
45 | @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
46 |
47 | perf_build: release
48 |
49 | perf_run:
50 | $(PROG) $(PERF_RUN_ARGS)
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Threading Building Blocks 2019 Update 1
2 | [](https://github.com/01org/tbb/releases/tag/2019_U1)
3 | [](LICENSE)
4 |
5 | Threading Building Blocks (TBB) lets you easily write parallel C++ programs that take
6 | full advantage of multicore performance, that are portable, composable and have future-proof scalability.
7 |
8 | ## Release Information
9 | Here are the latest [Changes](CHANGES) and [Release Notes](doc/Release_Notes.txt) (contains system requirements and known issues).
10 |
11 | Since [2018 U5](https://github.com/01org/tbb/releases/tag/2018_U5) TBB binary packages include [Parallel STL](https://github.com/intel/parallelstl) as a high-level component.
12 |
13 | ## Documentation
14 | * TBB [tutorial](https://software.intel.com/en-us/tbb-tutorial)
15 | * TBB general documentation: [stable](https://software.intel.com/en-us/tbb-documentation)
16 | and [latest](https://www.threadingbuildingblocks.org/docs/help/index.htm)
17 |
18 | ## Support
19 | Please report issues and suggestions via
20 | [GitHub issues](https://github.com/01org/tbb/issues) or start a topic on the
21 | [TBB forum](http://software.intel.com/en-us/forums/intel-threading-building-blocks/).
22 |
23 | ## How to Contribute
24 | Please, read the instructions on the official [TBB open source site](https://www.threadingbuildingblocks.org/submit-contribution).
25 |
26 | ## Engineering team contacts
27 | * [E-mail us.](mailto:inteltbbdevelopers@intel.com)
28 |
29 | ------------------------------------------------------------------------
30 | Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries.
31 |
32 | \* Other names and brands may be claimed as the property of others.
33 |
--------------------------------------------------------------------------------
/examples/parallel_for/polygon_overlay/polyover.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | /*!
22 | * polyover.h : extern declarations for polyover.cpp
23 | */
24 | #include "rpolygon.h"
25 | #include "tbb/mutex.h"
26 | #include "tbb/spin_mutex.h"
27 |
28 | extern void OverlayOnePolygonWithMap(Polygon_map_t *resultMap, RPolygon *myPoly, Polygon_map_t *map2, tbb::spin_mutex *rMutex);
29 |
30 | extern void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2);
31 |
32 | // extern void NaiveParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
33 | extern void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, Polygon_map_t &polymap2);
34 |
35 | extern void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
36 | extern void SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
37 | extern void SplitParallelOverlayETS(ETS_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2);
38 |
39 | extern void CheckPolygonMap(Polygon_map_t *checkMap);
40 | extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2);
41 |
42 |
--------------------------------------------------------------------------------
/include/tbb/null_rw_mutex.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef __TBB_null_rw_mutex_H
22 | #define __TBB_null_rw_mutex_H
23 |
24 | #include "tbb_stddef.h"
25 |
26 | namespace tbb {
27 |
28 | //! A rw mutex which does nothing
29 | /** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation.
30 | @ingroup synchronization */
31 | class null_rw_mutex : internal::mutex_copy_deprecated_and_disabled {
32 | public:
33 | //! Represents acquisition of a mutex.
34 | class scoped_lock : internal::no_copy {
35 | public:
36 | scoped_lock() {}
37 | scoped_lock( null_rw_mutex& , bool = true ) {}
38 | ~scoped_lock() {}
39 | void acquire( null_rw_mutex& , bool = true ) {}
40 | bool upgrade_to_writer() { return true; }
41 | bool downgrade_to_reader() { return true; }
42 | bool try_acquire( null_rw_mutex& , bool = true ) { return true; }
43 | void release() {}
44 | };
45 |
46 | null_rw_mutex() {}
47 |
48 | // Mutex traits
49 | static const bool is_rw_mutex = true;
50 | static const bool is_recursive_mutex = true;
51 | static const bool is_fair_mutex = true;
52 | };
53 |
54 | }
55 |
56 | #endif /* __TBB_null_rw_mutex_H */
57 |
--------------------------------------------------------------------------------
/examples/concurrent_hash_map/count_strings/Makefile.windows:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # Common Makefile that builds and runs example.
20 |
21 | # Just specify your program basename
22 | PROG=Count_Strings
23 | ARGS=
24 | PERF_RUN_ARGS=auto 10000000 silent
25 |
26 | # The C++ compiler options
27 |
28 | # Trying to find if icl.exe is set
29 | CXX1 = $(TBB_CXX)-
30 | CXX2 = $(CXX1:icl.exe-=icl.exe)
31 | CXX = $(CXX2:-=cl.exe)
32 |
33 | MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS)
34 | MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS)
35 |
36 | all: release test
37 | release: compiler_check
38 | $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
39 | debug: compiler_check
40 | $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe
41 | clean:
42 | @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest
43 | test:
44 | $(PROG) $(ARGS)
45 | compiler_check:
46 | @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly"
47 | @cmd.exe /C del compiler_test
48 | perf_build: release
49 | perf_run:
50 | $(PROG) $(PERF_RUN_ARGS)
51 |
52 |
--------------------------------------------------------------------------------
/src/test/harness_allocator_overload.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #ifndef tbb_test_harness_allocator_overload_H
22 | #define tbb_test_harness_allocator_overload_H
23 |
24 | #include "../tbbmalloc/proxy.h" // for MALLOC_UNIXLIKE_OVERLOAD_ENABLED, MALLOC_ZONE_OVERLOAD_ENABLED
25 | #include "tbb/tbb_config.h" // for __TBB_WIN8UI_SUPPORT
26 |
27 | // Skip configurations with unsupported system malloc overload:
28 | // skip unsupported MSVCs, WIN8UI and MINGW (it doesn't define _MSC_VER),
29 | // no support for MSVC 2015 and greater in debug for now,
30 | // don't use defined(_MSC_VER), because result of using defined() in macro expansion is undefined
31 | #define MALLOC_WINDOWS_OVERLOAD_ENABLED ((_WIN32||_WIN64) && !__TBB_WIN8UI_SUPPORT && _MSC_VER >= 1500 && !(_MSC_VER >= 1900 && _DEBUG))
32 |
33 | // Skip configurations with unsupported system malloc overload:
34 | // * overload via linking with -lmalloc_proxy is broken in offload,
35 | // as the library is loaded too late in that mode,
36 | // * LD_PRELOAD mechanism is broken in offload
37 | #define HARNESS_SKIP_TEST ((!MALLOC_WINDOWS_OVERLOAD_ENABLED && !MALLOC_UNIXLIKE_OVERLOAD_ENABLED && !MALLOC_ZONE_OVERLOAD_ENABLED) || __TBB_MIC_OFFLOAD)
38 |
39 | #endif // tbb_test_harness_allocator_overload_H
40 |
--------------------------------------------------------------------------------
/examples/parallel_for/tachyon/msvs/win8ui/App.xaml.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "DirectXPage.xaml.h"
22 |
23 | using namespace tbbTachyon;
24 |
25 | using namespace Platform;
26 | using namespace Windows::ApplicationModel;
27 | using namespace Windows::ApplicationModel::Activation;
28 | using namespace Windows::Foundation;
29 | using namespace Windows::Foundation::Collections;
30 | using namespace Windows::Storage;
31 | using namespace Windows::UI::Xaml;
32 | using namespace Windows::UI::Xaml::Controls;
33 | using namespace Windows::UI::Xaml::Controls::Primitives;
34 | using namespace Windows::UI::Xaml::Data;
35 | using namespace Windows::UI::Xaml::Input;
36 | using namespace Windows::UI::Xaml::Interop;
37 | using namespace Windows::UI::Xaml::Media;
38 | using namespace Windows::UI::Xaml::Navigation;
39 |
40 | #include "src/tachyon_video.h"
41 |
42 | App::App()
43 | {
44 | InitializeComponent();
45 | }
46 |
47 | void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ pArgs)
48 | {
49 | m_directXPage = ref new DirectXPage();
50 |
51 | // Place the frame in the current Window and ensure that it is active
52 | Window::Current->Content = m_directXPage;
53 | Window::Current->Activate();
54 | }
55 |
--------------------------------------------------------------------------------
/examples/graph/stereo/Makefile:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2005-2018 Intel Corporation
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | #
16 | #
17 | #
18 |
19 | # GNU Makefile that builds and runs example.
20 | run_cmd=
21 | PROG=stereo
22 | ARGS=
23 | PERF_RUN_ARGS=
24 |
25 | # icpc by default
26 | ifneq (,$(shell which icc 2>/dev/null))
27 | CXX=icpc
28 | endif
29 |
30 | # autodetect C++11 support
31 | include ../../common/examples-common.inc
32 |
33 | # TBB libs
34 | TBBLIB=-ltbb
35 | TBBLIB_DEBUG=-ltbb_debug
36 |
37 | # OpenCL lib
38 | OPENCL_LIB=-lOpenCL
39 |
40 | ifeq ($(shell uname), Linux)
41 | ifeq ($(target), android)
42 | LIBS+= --sysroot=$(SYSROOT)
43 | run_cmd=../../common/android.linux.launcher.sh
44 | else
45 | LIBS+= -lrt
46 | endif
47 | else
48 | ifeq ($(shell uname),Darwin)
49 | override CXXFLAGS += -Wl,-rpath,$(TBBROOT)/lib
50 | override OPENCL_LIB=-framework OpenCL
51 | endif
52 | endif
53 |
54 | all: release test
55 |
56 | release: *.cpp
57 | $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB) $(OPENCL_LIB) $(LIBS) $(CXX0XFLAGS)
58 |
59 | debug: *.cpp
60 | $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB_DEBUG) $(OPENCL_LIB) $(LIBS) $(CXX0XFLAGS)
61 |
62 | clean:
63 | $(RM) $(PROG) *.o *.d
64 |
65 | test:
66 | $(run_cmd) ./$(PROG) $(ARGS)
67 |
68 | perf_build: release
69 |
70 | perf_run:
71 | $(run_cmd) ./$(PROG) $(PERF_RUN_ARGS)
72 |
73 |
--------------------------------------------------------------------------------
/src/test/harness_task.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include "tbb/task.h"
22 | #include "harness.h"
23 |
24 | //! Helper for verifying that old use cases of spawn syntax still work.
25 | tbb::task* GetTaskPtr( int& counter ) {
26 | ++counter;
27 | return NULL;
28 | }
29 |
30 | class TaskGenerator: public tbb::task {
31 | int m_ChildCount;
32 | int m_Depth;
33 |
34 | public:
35 | TaskGenerator( int child_count, int _depth ) : m_ChildCount(child_count), m_Depth(_depth) {}
36 | ~TaskGenerator( ) { m_ChildCount = m_Depth = -125; }
37 |
38 | tbb::task* execute() __TBB_override {
39 | ASSERT( m_ChildCount>=0 && m_Depth>=0, NULL );
40 | if( m_Depth>0 ) {
41 | recycle_as_safe_continuation();
42 | set_ref_count( m_ChildCount+1 );
43 | int k=0;
44 | for( int j=0; jspawn(t);
47 | }
48 | ASSERT(k==m_ChildCount,NULL);
49 | --m_Depth;
50 | __TBB_Yield();
51 | ASSERT( state()==recycle && ref_count()>0, NULL);
52 | }
53 | return NULL;
54 | }
55 | };
56 |
--------------------------------------------------------------------------------
/src/tbb/ibm_aix51/atomic_support.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2005-2018 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 |
18 |
19 | */
20 |
21 | #include
22 | #include
23 |
24 | /* This file must be compiled with gcc. The IBM compiler doesn't seem to
25 | support inline assembly statements (October 2007). */
26 |
27 | #ifdef __GNUC__
28 |
29 | int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand) {
30 | __asm__ __volatile__ ("sync\n"); /* memory release operation */
31 | compare_and_swap ((atomic_p) ptr, &comparand, value);
32 | __asm__ __volatile__ ("isync\n"); /* memory acquire operation */
33 | return comparand;
34 | }
35 |
36 | int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand) {
37 | __asm__ __volatile__ ("sync\n"); /* memory release operation */
38 | compare_and_swaplp ((atomic_l) ptr, &comparand, value);
39 | __asm__ __volatile__ ("isync\n"); /* memory acquire operation */
40 | return comparand;
41 | }
42 |
43 | void __TBB_machine_flush () {
44 | __asm__ __volatile__ ("sync\n");
45 | }
46 |
47 | void __TBB_machine_lwsync () {
48 | __asm__ __volatile__ ("lwsync\n");
49 | }
50 |
51 | void __TBB_machine_isync () {
52 | __asm__ __volatile__ ("isync\n");
53 | }
54 |
55 | #endif /* __GNUC__ */
56 |
--------------------------------------------------------------------------------