File tree Expand file tree Collapse file tree 10 files changed +119
-0
lines changed Expand file tree Collapse file tree 10 files changed +119
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,24 @@ else if [ os.name ] = MACOSX
2222 toolset-choices += darwin ;
2323}
2424
25+ # nvcc toolsets
26+ if [ os.name ] = NT
27+ {
28+ toolset-choices += nvcc-9.2 ;
29+ }
30+ else if [ os.name ] = CYGWIN
31+ {
32+ toolset-choices += nvcc-9.2 ;
33+ }
34+ else if [ os.name ] = LINUX
35+ {
36+ toolset-choices += nvcc-9.1 ;
37+ }
38+ else if [ os.name ] = MACOSX
39+ {
40+ toolset-choices += nvcc-9.2 ;
41+ }
42+
2543echo "building for the following toolsets:" ;
2644for local t in $(toolset-choices)
2745{
@@ -100,3 +118,11 @@ link main_a_cpp.cpp liba_cpp ;
100118link stdlib_io_cpp.cpp ;
101119link stdlib_cpp.cpp ;
102120run hello_cpp.cpp ;
121+
122+ #compile a_cu.cu : <toolset>nvcc ;
123+ #link main_cu.cu : <toolset>nvcc ;
124+ #lib liba_cu : a_cu.cu a_cu.cuh : <toolset>nvcc ;
125+ #link main_a_cu.cu liba_cu : <toolset>nvcc ;
126+ #link stdlib_io_cu.cu : <toolset>nvcc ;
127+ #link stdlib_cu.cu : <toolset>nvcc ;
128+ #run hello_cu.cu : <toolset>nvcc ;
Original file line number Diff line number Diff line change @@ -80,12 +80,29 @@ following command.
8080 link=static \
8181 threading=single
8282
83+ To limit tests during development, narrow the properties as much as
84+ possible to test as few variants as desired. For example, to minimize
85+ the GPU architecture and GPU code, run the following command.
86+
87+ .. code :: sh
88+
89+ $ b2 --test-config=user-config.jam \
90+ --hash \
91+ toolset=nvcc \
92+ gpu-architecture=compute_70 \
93+ gpu-code=sm_70
94+
8395 Requirements
8496------------
8597
8698* Boost.Build
8799* All desired compilers
88100
101+ NVIDIA nvcc
102+ ~~~~~~~~~~~
103+
104+ CUDA installed in the default location.
105+
89106Adding Toolsets
90107---------------
91108
Original file line number Diff line number Diff line change 1+ #include " a_cpp.cuh"
2+
3+ namespace acpp
4+ {
5+ void
6+ acpp ()
7+ {
8+ }
9+ }
Original file line number Diff line number Diff line change 1+ #ifndef acpp_hpp_
2+ #define acpp_hpp_
3+
4+ namespace acpp
5+ {
6+ void
7+ acpp ();
8+ }
9+
10+ #endif
Original file line number Diff line number Diff line change 1+ #include < string>
2+
3+ int
4+ main ()
5+ {
6+ std::string s (" Hello, world!\n " );
7+
8+ return 0 ;
9+ }
Original file line number Diff line number Diff line change 1+ #include " a_cpp.cuh"
2+
3+ int
4+ main ()
5+ {
6+ acpp::acpp ();
7+
8+ return 0 ;
9+ }
Original file line number Diff line number Diff line change 1+ int
2+ main ()
3+ {
4+ return 0 ;
5+ }
Original file line number Diff line number Diff line change 11import os ;
22
3+ path-constant boost-build-nvcc : ../boost-build-nvcc ;
4+
5+ # @todo HACK - add tools to the Boost.Build path
6+ {
7+ import modules ;
8+
9+ local boost-build-path = [ modules.peek : BOOST_BUILD_PATH ] ;
10+ modules.poke : BOOST_BUILD_PATH : $(boost-build-nvcc) $(boost-build-path) ;
11+ }
12+
13+ path-constant HOME : [ os.environ HOME ] ;
14+
315# Default toolsets
416if [ os.name ] = NT
517{
@@ -17,3 +29,7 @@ else if [ os.name ] = MACOSX
1729{
1830 using darwin ;
1931}
32+
33+ # NVIDIA toolsets
34+
35+ using nvcc ;
Original file line number Diff line number Diff line change 1+ #include < string>
2+
3+ int
4+ main ()
5+ {
6+ std::string s (" Hello, world!\n " );
7+
8+ return 0 ;
9+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+
3+ int
4+ main ()
5+ {
6+ std::cout << " Hello, world!\n " ;
7+
8+ return 0 ;
9+ }
You can’t perform that action at this time.
0 commit comments