diff --git a/core/test/utils.hpp b/core/test/utils.hpp index 89b135a01f3..4f38565c1da 100644 --- a/core/test/utils.hpp +++ b/core/test/utils.hpp @@ -39,6 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include +#include + + #include #include @@ -51,46 +54,50 @@ namespace gko { namespace test { -using ValueTypes = - ::testing::Types, std::complex>; +typedef ::testing::Types, + std::complex> + ValueTypes; -using ComplexValueTypes = - ::testing::Types, std::complex>; +typedef ::testing::Types, std::complex> + ComplexValueTypes; -using IndexTypes = ::testing::Types; +typedef ::testing::Types IndexTypes; -using ValueAndIndexTypes = - ::testing::Types, std::complex, - gko::int32, gko::int64, gko::size_type>; +typedef ::testing::Types, + std::complex, gko::int32, gko::int64, + gko::size_type> + ValueAndIndexTypes; -using ValueIndexTypes = ::testing::Types< +typedef ::testing::Types< std::tuple, std::tuple, std::tuple, gko::int32>, std::tuple, gko::int32>, std::tuple, std::tuple, std::tuple, gko::int64>, - std::tuple, gko::int64>>; + std::tuple, gko::int64>> + ValueIndexTypes; -using RealValueIndexTypes = ::testing::Types< +typedef ::testing::Types< std::tuple, std::tuple, - std::tuple, std::tuple>; + std::tuple, std::tuple> + RealValueIndexTypes; -using ComplexValueIndexTypes = - ::testing::Types, gko::int32>, - std::tuple, gko::int32>, - std::tuple, gko::int64>, - std::tuple, gko::int64>>; +typedef ::testing::Types, gko::int32>, + std::tuple, gko::int32>, + std::tuple, gko::int64>, + std::tuple, gko::int64>> + ComplexValueIndexTypes; template struct reduction_factor { static constexpr gko::remove_complex value = - std::is_same, float>::value ? 1.0e-7 : 1.0e-14; + std::is_same, float>::value ? 1.0e-7f : 1.0e-14; }; diff --git a/include/ginkgo/core/base/executor.hpp b/include/ginkgo/core/base/executor.hpp index e369c031d07..0f4c1ad07c3 100644 --- a/include/ginkgo/core/base/executor.hpp +++ b/include/ginkgo/core/base/executor.hpp @@ -569,7 +569,7 @@ class Executor : public log::EnableLogging { try { this->raw_copy_from(src_exec, num_elems * sizeof(T), src_ptr, dest_ptr); - } catch (NotSupported &err) { + } catch (NotSupported &) { // Unoptimized copy. Try to go through the masters. auto src_master = src_exec->get_master().get(); if (num_elems > 0 && src_master != src_exec) { diff --git a/include/ginkgo/core/base/lin_op.hpp b/include/ginkgo/core/base/lin_op.hpp index 6c873198b6e..a49d945d1ca 100644 --- a/include/ginkgo/core/base/lin_op.hpp +++ b/include/ginkgo/core/base/lin_op.hpp @@ -810,12 +810,12 @@ using EnableDefaultLinOpFactory = * * @ingroup LinOp */ -#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name) \ -public: \ - class _factory_name; \ - struct _parameters_name##_type \ - : ::gko::enable_parameters_type<_parameters_name##_type, \ - _factory_name> +#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name) \ +public: \ + class _factory_name; \ + class _parameters_name##_type \ + : public ::gko::enable_parameters_type<_parameters_name##_type, \ + _factory_name> /** diff --git a/include/ginkgo/core/matrix/csr.hpp b/include/ginkgo/core/matrix/csr.hpp index a30f6f856e3..bc83a6be795 100644 --- a/include/ginkgo/core/matrix/csr.hpp +++ b/include/ginkgo/core/matrix/csr.hpp @@ -484,13 +484,13 @@ class Csr : public EnableLinOp>, const index_type nvidia_row_len_limit = 1024; /* Use imbalance strategy when the matrix has more more than 1e6 on * NVIDIA hardware */ - const index_type nvidia_nnz_limit = 1e6; + const index_type nvidia_nnz_limit{1e6}; /* Use imbalance strategy when the maximum number of nonzero per row is * more than 768 on AMD hardware */ const index_type amd_row_len_limit = 768; /* Use imbalance strategy when the matrix has more more than 1e8 on AMD * hardware */ - const index_type amd_nnz_limit = 1e8; + const index_type amd_nnz_limit{1e8}; /** * Creates an automatical strategy. diff --git a/third_party/gtest/CMakeLists.txt b/third_party/gtest/CMakeLists.txt index f68db6d2060..9d13c970cc7 100644 --- a/third_party/gtest/CMakeLists.txt +++ b/third_party/gtest/CMakeLists.txt @@ -2,13 +2,13 @@ if(MSVC) # Force using shared runtime library when MSVC builds shared libraries ginkgo_load_git_package(gtest_external "https://github.com/google/googletest.git" - "ee3aa831172090fd5442820f215cb04ab6062756" + "6a7ed316a5cdc07b6d26362c90770787513822d4" # Work around the linking errors when compiling gtest with CUDA "-Dgtest_disable_pthreads=ON" "-Dgtest_force_shared_crt=${BUILD_SHARED_LIBS}") else() ginkgo_load_git_package(gtest_external "https://github.com/google/googletest.git" - "ee3aa831172090fd5442820f215cb04ab6062756" + "6a7ed316a5cdc07b6d26362c90770787513822d4" # Work around the linking errors when compiling gtest with CUDA "-Dgtest_disable_pthreads=ON" "-DCMAKE_CXX_FLAGS=-fPIC")