Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions RandLAPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@

set(RandLAPACK_cxx_sources
rl_abrik.hh
rl_lapackpp.hh
rl_cqrrt.hh
rl_cqrrpt.hh
rl_bqrrp.hh
rl_rsvd.hh
rl_revd2.hh
rl_qb.hh
rl_orth.hh
rl_util.hh
rl_determiter.hh
rl_rs.hh
rl_rf.hh
rl_syps.hh
rl_syrf.hh
rl_rpchol.hh
rl_blaspp.hh
rl_pdkernels.hh
rl_exceptions.hh

rl_cusolver.hh
rl_cuda_kernels.cuh
rl_cuda_macros.hh
rl_cqrrpt_gpu.hh
rl_bqrrp_gpu.hh
)

add_library(RandLAPACK INTERFACE)
target_compile_features(RandLAPACK INTERFACE cxx_std_20)

Expand Down
58 changes: 0 additions & 58 deletions RandLAPACK/gpu_functions/rl_cusolver.hh

This file was deleted.

8 changes: 5 additions & 3 deletions RandLAPACK/rl_config.hh.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once
#include "../RandBLAS/RandBLAS/config.h.in"

// CMake's configure_file turns this template into rl_config.hh at configure time, and
// the generated copy is installed with the headers so downstream projects can query the
// version. RandBLAS's own config.h arrives through RandBLAS.hh, so it is not repeated
// here. test/misc/test_config.cc exists to keep this header compiled.

#define RandLAPACK_VERSION "@RandLAPACK_VERSION@"
#define RandLAPACK_VERSION_MAJOR @RandLAPACK_VERSION_MAJOR@
#define RandLAPACK_VERSION_MINOR @RandLAPACK_VERSION_MINOR@
#define RandLAPACK_VERSION_PATCH @RandLAPACK_VERSION_PATCH@

#endif
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ if (GTest_FOUND)
drivers/test_hqrrp.cc
drivers/test_abrik.cc
drivers/test_orth_linop.cc
misc/test_config.cc
misc/test_util.cc
misc/test_pdkernels.cc
linops/test_linops.cc
Expand Down
35 changes: 35 additions & 0 deletions test/misc/test_config.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// rl_config.hh is generated by CMake and installed, but nothing in the library
// includes it, so for a long time nothing compiled it and it silently stopped being
// valid C++. These tests are cheap; their real job is to keep that from recurring.

#include "RandLAPACK/rl_config.hh"

#include <gtest/gtest.h>
#include <string>

class TestConfig : public ::testing::Test {};

TEST_F(TestConfig, version_macros_are_defined) {
// Compilation is the substantive check. These assertions document what the header
// is expected to provide.
std::string version = RandLAPACK_VERSION;
EXPECT_FALSE(version.empty());

EXPECT_GE(RandLAPACK_VERSION_MAJOR, 0);
EXPECT_GE(RandLAPACK_VERSION_MINOR, 0);
EXPECT_GE(RandLAPACK_VERSION_PATCH, 0);
}

TEST_F(TestConfig, version_string_starts_with_the_numeric_components) {
// rl_version.cmake derives the components from `git describe`, so the string always
// begins with MAJOR.MINOR.PATCH and may carry a commit suffix after that.
std::string expected_prefix =
std::to_string(RandLAPACK_VERSION_MAJOR) + "." +
std::to_string(RandLAPACK_VERSION_MINOR) + "." +
std::to_string(RandLAPACK_VERSION_PATCH);
std::string version = RandLAPACK_VERSION;

EXPECT_EQ(version.rfind(expected_prefix, 0), 0u)
<< "version string \"" << version << "\" does not start with \""
<< expected_prefix << "\"";
}
Loading