Skip to content

Commit

Permalink
adding a new CONCURRENCY tag to classify std::execution programs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravenwater committed Dec 2, 2024
1 parent 153c197 commit 5a869eb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 18 deletions.
29 changes: 16 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ option(UNIVRSL_BUILD_NUMERICS "Set to ON to build all the num
option(UNIVRSL_BUILD_BENCHMARKS "Set to ON to build all the benchmark components" OFF)
option(UNIVRSL_BUILD_MIXEDPRECISION_SDK "Set to ON to build the mixed-precision SDK" OFF)
option(UNIVRSL_BUILD_COMPLEX "Set to ON to build complex support components" OFF)
option(UNIVRSL_BUILD_CONCURRENCY "Set to ON to build concurrent components" OFF)

# or, build individual components
# utilities and educational examples
Expand Down Expand Up @@ -609,8 +610,9 @@ if(UNIVRSL_BUILD_ALL)
set(UNIVRSL_BUILD_TYPE_HIERARCHY ON)
set(UNIVRSL_BUILD_MIXEDPRECISION_SDK ON)
set(UNIVRSL_BUILD_APP_ENVIRONMENT ON)
# for the moment, explicitely turn COMPLEX off until we have a standalone complex<> solution
set(UNIVRSL_BUILD_COMPLEX OFF)
# for the moment, explicitely turn COMPLEX off until we have a standalone complex<> solution
set(UNIVRSL_BUILD_COMPLEX OFF)
set(UNIVRSL_BUILD_CONCURRENCY ON)

# build the BLAS test/verification suites
set(UNIVRSL_BUILD_LINEAR_ALGEBRA_BLAS ON)
Expand All @@ -635,6 +637,7 @@ if(UNIVRSL_BUILD_CI)
set(UNIVRSL_BUILD_MIXEDPRECISION_SDK OFF)
set(UNIVRSL_BUILD_APP_ENVIRONMENT ON)
set(UNIVRSL_BUILD_COMPLEX OFF)
set(UNIVRSL_BUILD_CONCURRENCY OFF)
endif(UNIVRSL_BUILD_CI)

# core demonstration example applications that use the library
Expand All @@ -647,17 +650,17 @@ endif(UNIVRSL_BUILD_DEMONSTRATION)

# enable complex environment components
if(UNIVRSL_BUILD_COMPLEX)
# right now, the complex arithmetic and math functions (imag, real, conj)
# are maintained in the individual number system regression suites.
# Their respective build systems will use UNIVRSL_BUILD_COMPLEX to add/remove
# the complex<> regression suites.
set(UNIVRSL_BUILD_APPLICATIONS ON)
set(UNIVRSL_BUILD_NUMBER_FIXPNTS ON)
set(UNIVRSL_BUILD_NUMBER_CFLOATS ON)
set(UNIVRSL_BUILD_NUMBER_POSITS ON)
# I am leaving this segment here as a pattern that might drive the development
# of a complex<> replacement that might need its own regression suite
# independent of user-defined types.
# right now, the complex arithmetic and math functions (imag, real, conj)
# are maintained in the individual number system regression suites.
# Their respective build systems will use UNIVRSL_BUILD_COMPLEX to add/remove
# the complex<> regression suites.
set(UNIVRSL_BUILD_APPLICATIONS ON)
set(UNIVRSL_BUILD_NUMBER_FIXPNTS ON)
set(UNIVRSL_BUILD_NUMBER_CFLOATS ON)
set(UNIVRSL_BUILD_NUMBER_POSITS ON)
# I am leaving this segment here as a pattern that might drive the development
# of a complex<> replacement that might need its own regression suite
# independent of user-defined types.
endif(UNIVRSL_BUILD_COMPLEX)

if(UNIVRSL_BUILD_NUMBERS)
Expand Down
18 changes: 13 additions & 5 deletions playground/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set(COMPLEX_SRCS complex.cpp)

set(CONCURRENCY_SRCS concurrency.cpp)

set(REAL_SRCS efunc_posits.cpp
efunc_valids.cpp
gismo_test.cpp
Expand All @@ -10,16 +12,22 @@ set(REAL_SRCS efunc_posits.cpp
type_test.cpp
float_to_decimal_string.cpp
lazy_evaluation.cpp
concurrency.cpp
expression_templates.cpp
)

compile_all("true" "playground" "Playground" "${REAL_SRCS}")

# NOTE: AppleClang as XCode14 and Xcode15 have std::complex libs that do not support user defined types5
if(BUILD_COMPLEX)
if(UNIVRSL_BUILD_COMPLEX)
message(STATUS "Adding playground complex experiment")
compile_all("true" "playground_cmplx" "Complex/Playground" "${COMPLEX_SRCS}")
else(BUILD_COMPLEX)
compile_all("true" "play_cmplx" "Complex/Playground" "${COMPLEX_SRCS}")
else(UNIVRSL_BUILD_COMPLEX)
message(STATUS "Removing complex environment experiment in the Playground")
endif(BUILD_COMPLEX)
endif(UNIVRSL_BUILD_COMPLEX)

if(UNIVRSL_BUILD_CONCURRENCY)
message(STATUS "Adding playground concurrency experiment")
compile_all("true" "play_conc" "Concurrency/Playground" "${COMPLEX_SRCS}")
else(UNIVRSL_BUILD_CONCURRENCY)
message(STATUS "Removing concurrency experiment in the Playground")
endif(UNIVRSL_BUILD_CONCURRENCY)
1 change: 1 addition & 0 deletions tools/cmake/summary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function(universal_print_configuration_summary)
universal_status(" UNIVRSL_BUILD_BENCHMARKS : ${UNIVRSL_BUILD_BENCHMARKS}")
universal_status(" UNIVRSL_BUILD_MIXEDPRECISION_SDK : ${UNIVRSL_BUILD_MIXEDPRECISION_SDK}")
universal_status(" UNIVRSL_BUILD_COMPLEX : ${UNIVRSL_BUILD_COMPLEX}")
universal_status(" UNIVRSL_BUILD_CONCURRENCY : ${UNIVRSL_BUILD_CONCURRENCY}")
universal_status("")
universal_status(" UNIVRSL_BUILD_CMD_LINE_TOOLS : ${UNIVRSL_BUILD_CMD_LINE_TOOLS}")
universal_status(" UNIVRSL_BUILD_EDUCATION : ${UNIVRSL_BUILD_EDUCATION}")
Expand Down

0 comments on commit 5a869eb

Please sign in to comment.