File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,6 +339,10 @@ unset(CMAKE_CXX_VISIBILITY_PRESET)
339339
340340include (CTest )
341341
342+ configure_file (
343+ ${CMAKE_MODULE_PATH} /CTestCustom.cmake
344+ ${PROJECT_BINARY_DIR} /CTestCustom.cmake )
345+
342346# Handle depricated BUILD_TEST variable if found.
343347if (BUILD_TEST)
344348 set (BUILD_TESTING ${BUILD_TEST} )
Original file line number Diff line number Diff line change 1+ # This is a known leak.
2+ leak:getKernel
3+ #leak:libOpenCL
4+ leak:libnvidia-ptxjitcompile
5+ leak:tbb::internal::task_stream
Original file line number Diff line number Diff line change 1+
2+
3+ set (CTEST_CUSTOM_ERROR_POST_CONTEXT 20)
4+ set (CTEST_CUSTOM_ERROR_PRE_CONTEXT 20)
5+ set (CTEST_CUSTOM_POST_TEST ./test/print_info)
6+
7+ list (APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE
8+ "test/gtest/*"
9+
10+ # All external and third_party libraries
11+ "src/backend/cpu/threads/*"
12+ "src/backend/cuda/cub/*"
13+ "cl2.hpp"
14+
15+ # Remove bin2cpp from coverage
16+ "CMakeModules/*" )
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ make_test(SRC solve_dense.cpp CXX11)
259259make_test (SRC sort .cpp )
260260make_test (SRC sort_by_key.cpp )
261261make_test (SRC sort_index.cpp )
262- make_test (SRC sparse.cpp )
262+ make_test (SRC sparse.cpp SERIAL )
263263make_test (SRC sparse_arith.cpp )
264264make_test (SRC sparse_convert.cpp )
265265make_test (SRC stdev.cpp )
@@ -282,3 +282,15 @@ make_test(SRC write.cpp)
282282make_test (SRC ycbcr_rgb.cpp )
283283make_test (SRC inverse_deconv.cpp )
284284make_test (SRC iterative_deconv.cpp )
285+
286+
287+ add_executable (print_info print_info.cpp )
288+ if (AF_BUILD_UNIFIED)
289+ target_link_libraries (print_info ArrayFire::af )
290+ elseif (AF_BUILD_OPENCL)
291+ target_link_libraries (print_info ArrayFire::afopencl )
292+ elseif (AF_BUILD_CUDA)
293+ target_link_libraries (print_info ArrayFire::afcuda )
294+ elseif (AF_BUILD_CPU)
295+ target_link_libraries (print_info ArrayFire::afcpu )
296+ endif ()
Original file line number Diff line number Diff line change 1+ /* ******************************************************
2+ * Copyright (c) 2018, ArrayFire
3+ * All rights reserved.
4+ *
5+ * This file is distributed under 3-clause BSD license.
6+ * The complete license agreement can be obtained at:
7+ * http://arrayfire.com/licenses/BSD-3-Clause
8+ ********************************************************/
9+
10+ #include < arrayfire.h>
11+
12+ using namespace af ;
13+
14+ int main (int argc, const char ** argv) {
15+ int backend = getAvailableBackends ();
16+ if (backend & AF_BACKEND_OPENCL) {
17+ setBackend (AF_BACKEND_OPENCL);
18+ } else if (backend & AF_BACKEND_CUDA) {
19+ setBackend (AF_BACKEND_CUDA);
20+ } else if (backend & AF_BACKEND_CPU) {
21+ setBackend (AF_BACKEND_CPU);
22+ }
23+
24+ info ();
25+ return 0 ;
26+ }
You can’t perform that action at this time.
0 commit comments