Compare commits
10 Commits
9db2146841
...
af6b4126fc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af6b4126fc | ||
|
|
034543479d | ||
|
|
0cdae3490b | ||
|
|
0d24b80c80 | ||
|
|
b0872d34d0 | ||
|
|
18b53ee52a | ||
|
|
8ef944411e | ||
|
|
54cc1e362b | ||
|
|
6efd1bde9d | ||
|
|
7c426c5f2e |
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# tbb
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# tbb
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 码云特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
@ -0,0 +1,35 @@
|
||||
From e9a3bdcebf1d469b36b874d01c4116e7e23821cd Mon Sep 17 00:00:00 2001
|
||||
From: lvying6 <lvying6@huawei.com>
|
||||
Date: Sun, 26 Apr 2020 17:17:34 +0800
|
||||
Subject: [PATCH] tbb: fix __TBB_machine_fetchadd4 was not declared on ARM64
|
||||
|
||||
../../src/tbb/tools_api/ittnotify_config.h:338:12: error: '__TBB_machine_fetchadd4' was not declared in this scope
|
||||
return __TBB_machine_fetchadd4(ptr, 1) + 1L;
|
||||
^~~~~~~~~~~~~~~~~~~~~~~
|
||||
../../src/tbb/tools_api/ittnotify_config.h:338:12: note:
|
||||
suggested alternative: '__atomic_fetch_add_4'
|
||||
return __TBB_machine_fetchadd4(ptr, 1) + 1L;
|
||||
^~~~~~~~~~~~~~~~~~~~~~~
|
||||
__atomic_fetch_add_4
|
||||
|
||||
Signed-off-by: lvying6 <lvying6@huawei.com>
|
||||
---
|
||||
src/tbb/tools_api/ittnotify_config.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
|
||||
index bdb4ec2..041ceb3 100644
|
||||
--- a/src/tbb/tools_api/ittnotify_config.h
|
||||
+++ b/src/tbb/tools_api/ittnotify_config.h
|
||||
@@ -335,7 +335,7 @@ ITT_INLINE long
|
||||
__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
|
||||
ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
|
||||
{
|
||||
- return __TBB_machine_fetchadd4(ptr, 1) + 1L;
|
||||
+ return __atomic_fetch_add(ptr, 1L, __ATOMIC_SEQ_CST) + 1L;
|
||||
}
|
||||
#endif /* ITT_SIMPLE_INIT */
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
BIN
oneTBB-2020.2.tar.gz
Normal file
BIN
oneTBB-2020.2.tar.gz
Normal file
Binary file not shown.
5
tbb.pc
Normal file
5
tbb.pc
Normal file
@ -0,0 +1,5 @@
|
||||
Name: Threading Building Blocks
|
||||
Description: The Threading Building Blocks library abstracts low-level threading details
|
||||
URL: http://www.threadingbuildingblocks.org/
|
||||
Version: _openEuler_VERSION
|
||||
Libs: -ltbb
|
||||
156
tbb.spec
Normal file
156
tbb.spec
Normal file
@ -0,0 +1,156 @@
|
||||
Name: tbb
|
||||
Version: 2020.2
|
||||
Release: 3
|
||||
Summary: Threading Building Blocks lets you easily write parallel C++ programs
|
||||
License: ASL 2.0
|
||||
URL: http://threadingbuildingblocks.org/
|
||||
|
||||
Source0: https://github.com/01org/tbb/archive/oneTBB-2020.2.tar.gz
|
||||
Source6: tbb.pc
|
||||
Source7: tbbmalloc.pc
|
||||
Source8: tbbmalloc_proxy.pc
|
||||
Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch
|
||||
|
||||
BuildRequires: gcc-c++ doxygen swig python3-devel
|
||||
|
||||
%description
|
||||
Threading Building Blocks (TBB) lets you easily write parallel C++ programs that
|
||||
take full advantage of multicore performance, that are portable, composable and
|
||||
have future-proof scalability.
|
||||
|
||||
%package devel
|
||||
Summary: C++ headers and shared development libraries of TBB
|
||||
Requires: tbb%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The Threading Building Blocks (TBB) C++ libraries including Header files and
|
||||
shared object symlinks.
|
||||
|
||||
%package help
|
||||
Summary: Documents for tbb
|
||||
Buildarch: noarch
|
||||
Requires: man info
|
||||
Provides: bundled(jquery) tbb-doc = %{version}-%{release}
|
||||
Obsoletes: tbb-doc < %{version}-%{release}
|
||||
|
||||
%description help
|
||||
Man pages and other related documents for tbb.
|
||||
|
||||
%package -n python3-tbb
|
||||
Summary: TBB module of Python 3
|
||||
%{?python_provide:%python_provide python3-tbb}
|
||||
|
||||
%description -n python3-tbb
|
||||
TBB module of Python 3
|
||||
|
||||
%prep
|
||||
%autosetup -n oneTBB-%{version} -p1
|
||||
|
||||
sed -i 's/"`hostname -s`" ("`uname -m`"/openEulerbuild (%{_arch}/' \
|
||||
build/version_info_linux.sh
|
||||
sed -i 's/-mrtm//' build/linux.gcc.inc
|
||||
sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
|
||||
sed -i '/^#!/d' python/tbb/{pool,test}.py
|
||||
|
||||
%build
|
||||
%make_build tbb_build_prefix=obj stdver=c++14 \
|
||||
CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
|
||||
LDFLAGS="$RPM_LD_FLAGS -lpthread"
|
||||
%define pcsource {%{SOURCE6} %{SOURCE7} %{SOURCE8}}
|
||||
for pcfile in %{pcsource}; do
|
||||
base=$(basename ${pcfile})
|
||||
sed 's/_openEuler_VERSION/%{version}/' ${pcfile} > ${base}
|
||||
touch -r ${pcfile} ${base}
|
||||
done
|
||||
|
||||
. build/obj_release/tbbvars.sh
|
||||
pushd python
|
||||
%make_build -C rml stdver=c++14 \
|
||||
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
|
||||
LDFLAGS="$RPM_LD_FLAGS -lpthread"
|
||||
cp -p rml/libirml.so* .
|
||||
%py3_build
|
||||
popd
|
||||
|
||||
make doxygen
|
||||
|
||||
%check
|
||||
make test %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}/%{_libdir}
|
||||
mkdir -p %{buildroot}/%{_includedir}
|
||||
|
||||
pushd build/obj_release
|
||||
for file in libtbb{,malloc{,_proxy}}; do
|
||||
install -p -D -m 755 ${file}.so.2 %{buildroot}/%{_libdir}
|
||||
ln -s $file.so.2 %{buildroot}/%{_libdir}/$file.so
|
||||
done
|
||||
popd
|
||||
|
||||
pushd include
|
||||
find tbb -type f ! -name \*.htm\* -exec install -p -D -m 644 {} \
|
||||
%{buildroot}/%{_includedir}/{} \;
|
||||
popd
|
||||
|
||||
%define pcsource {%{SOURCE6} %{SOURCE7} %{SOURCE8}}
|
||||
for file in %{pcsource}; do
|
||||
install -p -D -m 644 $(basename ${file}) \
|
||||
%{buildroot}/%{_libdir}/pkgconfig/$(basename ${file})
|
||||
done
|
||||
|
||||
# Install the rml headers
|
||||
mkdir -p %{buildroot}%{_includedir}/rml
|
||||
cp -p src/rml/include/*.h %{buildroot}%{_includedir}/rml
|
||||
|
||||
. build/obj_release/tbbvars.sh
|
||||
pushd python
|
||||
%py3_install
|
||||
chmod a+x %{buildroot}%{python3_sitearch}/TBB.py
|
||||
chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py
|
||||
cp -p libirml.so.1 %{buildroot}%{_libdir}
|
||||
ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
|
||||
popd
|
||||
|
||||
mkdir -p %{buildroot}%{_libdir}/cmake
|
||||
cp -a cmake %{buildroot}%{_libdir}/cmake/tbb
|
||||
rm %{buildroot}%{_libdir}/cmake/tbb/README.rst
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license LICENSE
|
||||
%{_libdir}/libirml.so.1
|
||||
%{_libdir}/*.so.2
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
%{_includedir}/tbb
|
||||
%{_includedir}/rml
|
||||
%{_libdir}/cmake/
|
||||
%{_libdir}/*.so
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc doc/Release_Notes.txt html README README.md cmake/README.rst CHANGES
|
||||
|
||||
%files -n python3-tbb
|
||||
%doc python/index.html
|
||||
%{python3_sitearch}/TBB*
|
||||
%{python3_sitearch}/tbb/
|
||||
%{python3_sitearch}/__pycache__/TBB*
|
||||
|
||||
%changelog
|
||||
* Fri Jul 2 2021 Hugel <genqihu1@huawei.com> - 2020.2.3
|
||||
- Add multiple threads to make test
|
||||
|
||||
* Tue Aug 18 2020 smileknife<jackshan2010@aliyun.com> - 2020.2-2
|
||||
- update release for rebuilding
|
||||
|
||||
* Sun Apr 26 2020 lvying<lvying6@huawei.com> - 2020.2-1
|
||||
* upgrade to version 2020.2
|
||||
|
||||
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 2018.5-4
|
||||
- Package init
|
||||
5
tbbmalloc.pc
Normal file
5
tbbmalloc.pc
Normal file
@ -0,0 +1,5 @@
|
||||
Name: Threading Building Blocks Scalable Allocator
|
||||
Description: Implementation of Scalable Memory Allocator of Threading Building Blocks
|
||||
URL: http://www.threadingbuildingblocks.org/
|
||||
Version: _openEuler_VERSION
|
||||
Libs: -ltbbmalloc
|
||||
5
tbbmalloc_proxy.pc
Normal file
5
tbbmalloc_proxy.pc
Normal file
@ -0,0 +1,5 @@
|
||||
Name: Threading Building Blocks Scallable Malloc Proxy
|
||||
Description: Implementation of proxy that redirects memory allocation calls to TBB Scalable Memory Allocator
|
||||
URL: http://www.threadingbuildingblocks.org/
|
||||
Version: _openEuler_VERSION
|
||||
Libs: -ltbbmalloc_proxy -ltbbmalloc
|
||||
Loading…
x
Reference in New Issue
Block a user