From c0efc1b3659cccc3ed2fb1687c0fad61fe1184e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz> Date: Fri, 26 Jul 2019 14:02:49 +0100 Subject: [PATCH] Removed useless ViewTypeGetter trait type --- src/TNL/Containers/Array.h | 6 ------ src/TNL/Containers/Vector.h | 6 ------ src/TNL/Solvers/ODE/Euler.h | 1 - src/TNL/Solvers/ODE/Euler.hpp | 4 ++-- src/TNL/TypeTraits.h | 8 +------- 5 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/TNL/Containers/Array.h b/src/TNL/Containers/Array.h index 7f4d898e9a..9e304a8311 100644 --- a/src/TNL/Containers/Array.h +++ b/src/TNL/Containers/Array.h @@ -681,12 +681,6 @@ File& operator>>( File&& file, Array< Value, Device, Index, Allocator >& array ) } // namespace Containers -template< typename Value, typename Device, typename Index > -struct ViewTypeGetter< Containers::Array< Value, Device, Index > > -{ - using Type = Containers::ArrayView< Value, Device, Index >; -}; - template< typename Value_, typename Device, typename Index > struct IsStatic< Containers::Array< Value_, Device, Index > > { diff --git a/src/TNL/Containers/Vector.h b/src/TNL/Containers/Vector.h index e25098a58b..e199d8e7bf 100644 --- a/src/TNL/Containers/Vector.h +++ b/src/TNL/Containers/Vector.h @@ -258,12 +258,6 @@ public: } // namespace Containers -template< typename Real, typename Device, typename Index > -struct ViewTypeGetter< Containers::Vector< Real, Device, Index > > -{ - using Type = Containers::VectorView< Real, Device, Index >; -}; - template< typename Real, typename Device, typename Index > struct IsStatic< Containers::Vector< Real, Device, Index > > { diff --git a/src/TNL/Solvers/ODE/Euler.h b/src/TNL/Solvers/ODE/Euler.h index 6715147ce2..2ba128073e 100644 --- a/src/TNL/Solvers/ODE/Euler.h +++ b/src/TNL/Solvers/ODE/Euler.h @@ -32,7 +32,6 @@ class Euler : public ExplicitSolver< Problem, SolverMonitor > using RealType = typename ProblemType::RealType; using DeviceType = typename ProblemType::DeviceType; using IndexType = typename ProblemType::IndexType; - using DofVectorView = typename ViewTypeGetter< DofVectorType >::Type; using DofVectorPointer = Pointers::SharedPointer< DofVectorType, DeviceType >; using SolverMonitorType = SolverMonitor; diff --git a/src/TNL/Solvers/ODE/Euler.hpp b/src/TNL/Solvers/ODE/Euler.hpp index b6a5b21835..ccc98daa7e 100644 --- a/src/TNL/Solvers/ODE/Euler.hpp +++ b/src/TNL/Solvers/ODE/Euler.hpp @@ -79,8 +79,8 @@ bool Euler< Problem, SolverMonitor > :: solve( DofVectorPointer& _u ) */ //timer.start(); _k1->setLike( *_u ); - DofVectorView k1 = _k1->getView(); - DofVectorView u = _u->getView(); + auto k1 = _k1->getView(); + auto u = _u->getView(); k1 = 0.0; diff --git a/src/TNL/TypeTraits.h b/src/TNL/TypeTraits.h index c251dca018..134ebc4cac 100644 --- a/src/TNL/TypeTraits.h +++ b/src/TNL/TypeTraits.h @@ -9,17 +9,11 @@ /* See Copyright Notice in tnl/Copyright */ #pragma once + #include <type_traits> namespace TNL { -// TODO: remove - not used anywhere -template< typename T > -struct ViewTypeGetter -{ - using Type = T; -}; - template< typename T > struct IsStatic { -- GitLab