commit e894787dade9c53ad613dd9482be2187e5bd0edf
parent b3b9832977688eb54898dda7f530875d93455e72
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 1 Jul 2015 10:06:56 +0200
Fix the CL compilation of the ssp_ran_exp function
The C++ wrapping of the ssp RNG used by the C++ random distributions was
unsufficient. On the CL compiler the Boost Random API was it, and it expects
that the `result_type' type is defined on any RNG class.
We also fix the ssp tests by appending to their runtime environment the
directories of the Boost libraries.
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -60,7 +60,7 @@ else()
include_directories(${RSys_INCLUDE_DIR} ${Random123_INCLUDE_DIR})
endif()
-rcmake_append_runtime_dirs(_runtime_dirs RSys)
+rcmake_append_runtime_dirs(_runtime_dirs RSys ${Boost_LIBRARY_DIRS})
################################################################################
# Configure and define targets
@@ -113,7 +113,6 @@ if(NOT NO_TEST)
foreach(_lib ${_libraries})
target_link_libraries(${_name} ${_lib})
endforeach(_lib)
-
endfunction()
function(register_test _name)
diff --git a/src/ssp_rng.c b/src/ssp_rng.c
@@ -633,6 +633,8 @@ public:
FINLINE uint64_t min() const { return ssp_rng_min(rng); }
FINLINE uint64_t max() const { return ssp_rng_max(rng); }
+ typedef uint64_t result_type;
+
private:
ssp_rng* rng;
};