From 9146affd12e76f20cfb8b2831eb33594421b32c2 Mon Sep 17 00:00:00 2001 From: Lukas Cejka <lukas.ostatek@gmail.com> Date: Fri, 2 Nov 2018 14:18:45 +0100 Subject: [PATCH] In src/UnitTests/Matrices: Initial import of .cpp .cu .h files for the new test. --- src/UnitTests/Matrices/SparseMatrixTest.cpp | 11 ++++++ src/UnitTests/Matrices/SparseMatrixTest.cu | 11 ++++++ src/UnitTests/Matrices/SparseMatrixTest.h | 38 +++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 src/UnitTests/Matrices/SparseMatrixTest.cpp create mode 100644 src/UnitTests/Matrices/SparseMatrixTest.cu create mode 100644 src/UnitTests/Matrices/SparseMatrixTest.h diff --git a/src/UnitTests/Matrices/SparseMatrixTest.cpp b/src/UnitTests/Matrices/SparseMatrixTest.cpp new file mode 100644 index 0000000000..46f6b9bd35 --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest.cpp @@ -0,0 +1,11 @@ +/*************************************************************************** + SparseMatrixTest.cpp - description + ------------------- + begin : Nov 2, 2018 + copyright : (C) 2018 by Tomas Oberhuber et al. + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#include "SparseMatrixTest.h" \ No newline at end of file diff --git a/src/UnitTests/Matrices/SparseMatrixTest.cu b/src/UnitTests/Matrices/SparseMatrixTest.cu new file mode 100644 index 0000000000..01c23c1937 --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest.cu @@ -0,0 +1,11 @@ +/*************************************************************************** + SparseMatrixTest.cu - description + ------------------- + begin : Nov 2, 2018 + copyright : (C) 2018 by Tomas Oberhuber et al. + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#include "SparseMatrixTest.h" \ No newline at end of file diff --git a/src/UnitTests/Matrices/SparseMatrixTest.h b/src/UnitTests/Matrices/SparseMatrixTest.h new file mode 100644 index 0000000000..2a4e96d1ff --- /dev/null +++ b/src/UnitTests/Matrices/SparseMatrixTest.h @@ -0,0 +1,38 @@ +/*************************************************************************** + SparseMatrixTest.h - description + ------------------- + begin : Nov 2, 2018 + copyright : (C) 2018 by Tomas Oberhuber et al. + email : tomas.oberhuber@fjfi.cvut.cz + ***************************************************************************/ + +/* See Copyright Notice in tnl/Copyright */ + +#include <TNL/Matrices/CSR.h> +#include <TNL/Matrices/Ellpack.h> +#include <TNL/Matrices/SlicedEllpack.h> + +using CSR_host = TNL::Matrices::CSR< int, TNL::Devices::Host, int >; +using CSR_cuda = TNL::Matrices::CSR< int, TNL::Devices::Cuda, int >; +using E_host = TNL::Matrices::Ellpack< int, TNL::Devices::Host, int >; +using E_cuda = TNL::Matrices::Ellpack< int, TNL::Devices::Cuda, int >; +using SE_host = TNL::Matrices::SlicedEllpack< int, TNL::Devices::Host, int, 2 >; +using SE_cuda = TNL::Matrices::SlicedEllpack< int, TNL::Devices::Cuda, int, 2 >; + +#ifdef HAVE_GTEST +#include <gtest/gtest.h> +//TODO Tests go in here + +#endif + +#include "../GtestMissingError.h" +int main( int argc, char* argv[] ) +{ +#ifdef HAVE_GTEST + ::testing::InitGoogleTest( &argc, argv ); + return RUN_ALL_TESTS(); +#else + throw GtestMissingError(); +#endif +} + -- GitLab