Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for modular build structure. #196

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
6 changes: 4 additions & 2 deletions benchmarks/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
# Boost Software License, Version 1.0. (See accompanying file
# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

project boost/ublas/benchmarks
: requirements <library>/boost/program_options//boost_program_options
project
: requirements
<library>/boost/ublas//boost_ublas
<library>/boost/program_options//boost_program_options
;

exe add : add.cpp ;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/opencl/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ../../clblas ;
using opencl ;
using clblas ;

project boost/ublas/benchmarks/opencl
project
: requirements
<library>/boost/program_options//boost_program_options
<toolset>gcc:<cxxflags>-Wno-ignored-attributes
Expand Down
35 changes: 35 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/compute//boost_compute
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/interval//boost_interval
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/range//boost_range
/boost/serialization//boost_serialization
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits
/boost/typeof//boost_typeof ;

project /boost/ublas
: common-requirements
<include>include
;

explicit
[ alias boost_ublas : : : : <library>$(boost_dependencies) ]
[ alias all : boost_ublas benchmarks examples/tensor test ]
;

call-if : boost-library ublas
;

11 changes: 7 additions & 4 deletions examples/tensor/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

import ../../../../config/checks/config : requires ;

import-search /boost/config/checks ;
import config : requires ;

# Project settings
project boost-ublas-tensor-example
project
: requirements
<library>/boost/ublas//boost_ublas
<define>BOOST_UBLAS_NO_EXCEPTIONS
<toolset>vacpp:<define>"BOOST_UBLAS_NO_ELEMENT_PROXIES"
<toolset>gcc:<cxxflags>"-Wall -pedantic -Wextra -Wno-unknown-pragmas"
<toolset>clang:<cxxflags>"-Wall -pedantic -Wextra -Wno-unknown-pragmas"
<toolset>msvc:<cxxflags>"/W4" # == all
[ requires cxx17_if_constexpr ]
<cxxstd>20
;

exe access_tensor : access_tensor.cpp ;
exe access_tensor : access_tensor.cpp /boost/multiprecision//boost_multiprecision ;
exe simple_expressions : simple_expressions.cpp ;
exe multiply_tensors_product_function : multiply_tensors_product_function.cpp ;
exe multiply_tensors_einstein_notation : multiply_tensors_einstein_notation.cpp ;
Expand Down
75 changes: 39 additions & 36 deletions test/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,30 @@ UBLAS_TESTSET ?=
# Sparse matrices: USE_MAPPED_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX USE_MAPPED_VECTOR_OF_MAPPED_VECTOR USE_GENERALIZED_VECTOR_OF_VECTOR

UBLAS_TESTSET_SPARSE = [ modules.peek : UBLAS_TESTSET_SPARSE ] ;
UBLAS_TESTSET_SPARSE ?=
UBLAS_TESTSET_SPARSE ?=
USE_DOUBLE USE_STD_COMPLEX
# USE_RANGE USE_SLICE # Too complex for regression testing
USE_UNBOUNDED_ARRAY
USE_MAP_ARRAY USE_STD_MAP
USE_MAPPED_VECTOR USE_COMPRESSED_VECTOR
USE_MAPPED_MATRIX USE_COMPRESSED_MATRIX
USE_MAPPED_VECTOR USE_COMPRESSED_VECTOR
USE_MAPPED_MATRIX USE_COMPRESSED_MATRIX
;
# Generalize VofV still failing
# USE_GENERALIZED_VECTOR_OF_VECTOR

UBLAS_TESTSET_SPARSE_COO = [ modules.peek : UBLAS_TESTSET_SPARSE_COO ] ;
UBLAS_TESTSET_SPARSE_COO ?=
UBLAS_TESTSET_SPARSE_COO ?=
USE_DOUBLE USE_STD_COMPLEX
USE_UNBOUNDED_ARRAY
USE_COORDINATE_VECTOR
USE_COORDINATE_MATRIX
USE_COORDINATE_MATRIX
;


# Project settings
project boost-ublas-test
project
: requirements
<library>/boost/ublas//boost_ublas
<define>BOOST_UBLAS_NO_EXCEPTIONS
<toolset>vacpp:<define>"BOOST_UBLAS_NO_ELEMENT_PROXIES"
<toolset>gcc:<cxxflags>"-Wall -Wno-unknown-pragmas"
Expand Down Expand Up @@ -111,16 +112,17 @@ test-suite numeric/uBLAS
test33.cpp
: : :
<define>USE_FLOAT
<define>USE_DOUBLE
<define>USE_STD_COMPLEX
<define>USE_DOUBLE
<define>USE_STD_COMPLEX
<define>USE_STD_MAP
<define>USE_MAPPED_VECTOR_OF_MAPPED_VECTOR
: test3_mvov
<define>USE_MAPPED_VECTOR_OF_MAPPED_VECTOR
: test3_mvov
:
]
[ run test4.cpp
test42.cpp
test43.cpp
/boost/math//boost_math_tr1
: : :
<define>$(UBLAS_TESTSET)
]
Expand Down Expand Up @@ -165,92 +167,93 @@ test-suite numeric/uBLAS
]
[ run triangular_layout.cpp
]
[ run comp_mat_erase.cpp
[ run comp_mat_erase.cpp /boost/test//included
: : :
<toolset>msvc:<asynch-exceptions>on
]
[ run sparse_view_test.cpp
[ run sparse_view_test.cpp /boost/test//included
: : :
<toolset>msvc:<asynch-exceptions>on
]
[ run begin_end.cpp
[ run begin_end.cpp /boost/math//boost_math_tr1
]
[ run num_columns.cpp
[ run num_columns.cpp /boost/math//boost_math_tr1
]
[ run num_rows.cpp
[ run num_rows.cpp /boost/math//boost_math_tr1
]
[ run size.cpp
[ run size.cpp /boost/math//boost_math_tr1
]
[ run test_coordinate_matrix_sort.cpp
[ run test_coordinate_matrix_sort.cpp /boost/math//boost_math_tr1
]
[ run test_coordinate_matrix_sort.cpp
[ run test_coordinate_matrix_sort.cpp /boost/math//boost_math_tr1
:
:
: <define>BOOST_UBLAS_COO_ALWAYS_DO_FULL_SORT
: test_coordinate_matrix_always_do_full_sort
:
]
[ run test_complex_norms.cpp
[ run test_complex_norms.cpp /boost/math//boost_math_tr1
]
[ run test_scaled_norm.cpp
[ run test_scaled_norm.cpp /boost/math//boost_math_tr1
: : :
<define>BOOST_UBLAS_SCALED_NORM
]
[ run test_assignment.cpp
[ run test_assignment.cpp /boost/timer//boost_timer /boost/math//boost_math_tr1
: : :
<define>BOOST_UBLAS_COO_ALWAYS_DO_FULL_SORT
<define>BOOST_TIMER_ENABLE_DEPRECATED
]
[ run test_triangular.cpp
:
:
: <library>/boost/timer//boost_timer
]
[ run test_ticket7296.cpp
[ run test_ticket7296.cpp /boost/math//boost_math_tr1
:
:
: <toolset>msvc:<cxxflags>/wd4127 # The program checks that test facilities work fine. The warning appears many times.
:
:
]
[ run test_inplace_solve.cpp
:
:
[ run test_inplace_solve.cpp /boost/math//boost_math_tr1
:
:
: <define>$(UBLAS_TESTSET)
: test_inplace_solve_basic
:
]
[ run test_inplace_solve.cpp
:
:
[ run test_inplace_solve.cpp /boost/math//boost_math_tr1
:
:
: <define>$(UBLAS_TESTSET_SPARSE)
<define>$(UBLAS_TESTSET_SPARSE_COO)
: test_inplace_solve_sparse
:
]
[ run test_inplace_solve.cpp
:
:
[ run test_inplace_solve.cpp /boost/math//boost_math_tr1
:
:
: <define>USE_MAPPED_VECTOR_OF_MAPPED_VECTOR
: test_inplace_solve_mvov
:
]
[ run test_coordinate_vector_inplace_merge.cpp
[ run test_coordinate_vector_inplace_merge.cpp /boost/math//boost_math_tr1
]
[ run test_coordinate_matrix_inplace_merge.cpp
[ run test_coordinate_matrix_inplace_merge.cpp /boost/math//boost_math_tr1
]
[ run test_banded_storage_layout.cpp
[ run test_banded_storage_layout.cpp /boost/math//boost_math_tr1
:
:
:
:
:
]
[ run test_fixed_containers.cpp
[ run test_fixed_containers.cpp /boost/math//boost_math_tr1
:
:
:
]
[ run test_matrix_vector.cpp
[ run test_matrix_vector.cpp /boost/math//boost_math_tr1
]
[ compile minimal_allocator_test.cpp ]
;
Expand Down
2 changes: 1 addition & 1 deletion test/opencl/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ../../clblas ;
using opencl ;
using clblas ;

project boost/ublas/test/opencl
project
: requirements
<toolset>gcc:<cxxflags>-Wno-ignored-attributes
<toolset>clang:<cxxflags>-Wno-ignored-attributes
Expand Down
7 changes: 4 additions & 3 deletions test/tensor/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# Google and Fraunhofer IOSB, Ettlingen, Germany
#

import ../../../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

project boost/ublas/test/tensor
: requirements
Expand All @@ -22,7 +23,7 @@ project boost/ublas/test/tensor

alias unit_test_framework
: # sources
/boost//unit_test_framework
/boost/test//boost_unit_test_framework
;

# make aliases explicit so the libraries will only be built when requested
Expand Down Expand Up @@ -93,6 +94,6 @@ test-suite boost-ublas-tensor-test
:
: test_tensor
:
#
#
]
;
Loading