Commit 4675fbdf authored by Jakub Klinkovský's avatar Jakub Klinkovský

Devices: replaced getDeviceType() with getType()

parent e7880461
......@@ -53,7 +53,7 @@ public:
{
return "Atomic< " +
TNL::getType< T >() + ", " +
Devices::Host::getDeviceType() + " >";
Devices::Host::getType() + " >";
}
// CAS loops for updating maximum and minimum
......@@ -125,7 +125,7 @@ public:
{
return "Atomic< " +
TNL::getType< T >() + ", " +
Devices::Cuda::getDeviceType() + " >";
Devices::Cuda::getType() + " >";
}
bool is_lock_free() const noexcept
......
......@@ -35,7 +35,7 @@ struct ArrayIO< Value, Device, Index, true >
{
return String( "Containers::Array< " ) +
TNL::getType< Value >() + ", " +
Devices::Host::getDeviceType() + ", " +
Devices::Host::getType() + ", " +
TNL::getType< Index >() + " >";
}
......@@ -81,7 +81,7 @@ struct ArrayIO< Value, Device, Index, false >
{
return String( "Containers::Array< " ) +
TNL::getType< Value >() + ", " +
Devices::Host::getDeviceType() + ", " +
Devices::Host::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
......@@ -187,7 +187,7 @@ getType()
{
return String( "Containers::Array< " ) +
TNL::getType< Value >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
......@@ -33,7 +33,7 @@ getType()
{
return String( "Containers::ArrayView< " ) + ", " +
TNL::getType< Value >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
......@@ -170,7 +170,7 @@ getType()
{
return String( "Containers::DistributedArray< " ) +
TNL::getType< Value >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + ", " +
// TODO: communicators don't have a getType method
"<Communicator> >";
......
......@@ -194,7 +194,7 @@ getType()
{
return String( "Containers::DistributedArrayView< " ) +
TNL::getType< Value >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + ", " +
// TODO: communicators don't have a getType method
"<Communicator> >";
......
......@@ -93,7 +93,7 @@ getType()
{
return String( "Containers::DistributedVector< " ) +
TNL::getType< Real >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + ", " +
// TODO: communicators don't have a getType method
"<Communicator> >";
......
......@@ -74,7 +74,7 @@ getType()
{
return String( "Containers::DistributedVectorView< " ) +
TNL::getType< Real >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + ", " +
// TODO: communicators don't have a getType method
"<Communicator> >";
......
......@@ -54,7 +54,7 @@ getType()
return String( "EllpackIndexMultimap< ") +
String( TNL::getType< Index >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( ", " ) +
String( TNL::getType< LocalIndexType >() ) +
String( " >" );
......
......@@ -55,7 +55,7 @@ getType()
return String( "StaticEllpackIndexMultimap< ") +
String( TNL::getType< Index >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( ", " ) +
String( TNL::getType< LocalIndexType >() ) +
String( " >" );
......
......@@ -37,7 +37,7 @@ getType()
{
return String( "Containers::Vector< " ) +
TNL::getType< Real >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
......@@ -26,7 +26,7 @@ getType()
{
return String( "Containers::VectorView< " ) +
TNL::getType< Real >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
......@@ -25,12 +25,8 @@ namespace Devices {
class Cuda
{
public:
static inline String getDeviceType();
// TODO: Remove getDeviceType();
static inline String getType() { return getDeviceType();};
public:
static inline String getType();
static inline void configSetup( Config::ConfigDescription& config, const String& prefix = "" );
......
......@@ -21,7 +21,7 @@
namespace TNL {
namespace Devices {
inline String Cuda::getDeviceType()
inline String Cuda::getType()
{
return String( "Devices::Cuda" );
}
......
......@@ -25,14 +25,11 @@ namespace Devices {
class Host
{
public:
static String getDeviceType()
static String getType()
{
return String( "Devices::Host" );
}
// TODO: Remove getDeviceType();
static inline String getType() { return getDeviceType();};
static void disableOMP()
{
ompEnabled() = false;
......
......@@ -173,7 +173,7 @@ String AdEllpack< Real, Device, Index >::getType()
return String( "AdEllpack< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device::getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -54,7 +54,7 @@ String BiEllpackSymmetric< Real, Device, Index, StripSize >::getType()
return String( "BiEllpackMatrix< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -56,7 +56,7 @@ String BiEllpack< Real, Device, Index, StripSize >::getType()
return String( "BiEllpack< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device::getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -35,7 +35,7 @@ String COOMatrix< Real, Device, Index >::getType()
return String("COOMatrix< ") +
String(TNL::getType< Real>()) +
String(", ") +
Device::getDeviceType() +
Device::getType() +
String(" >");
}
......
......@@ -46,7 +46,7 @@ String CSR< Real, Device, Index >::getType()
return String( "Matrices::CSR< ") +
String( TNL::getType< Real>() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -44,7 +44,7 @@ String ChunkedEllpack< Real, Device, Index >::getType()
return String( "Matrices::ChunkedEllpack< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......@@ -314,7 +314,7 @@ template< typename Real,
Index ChunkedEllpack< Real, Device, Index >::getNonZeroRowLength( const IndexType row ) const
{
ConstMatrixRow matrixRow = getRow( row );
return matrixRow.getNonZeroElementsCount( Device::getDeviceType() );
return matrixRow.getNonZeroElementsCount( Device::getType() );
// IndexType elementCount ( 0 );
// ConstMatrixRow matrixRow = this->getRow( row );
......
......@@ -31,7 +31,7 @@ String Dense< Real, Device, Index >::getType()
{
return String( "Matrices::Dense< " ) +
String( TNL::getType< RealType >() ) + ", " +
String( Device :: getDeviceType() ) + ", " +
String( Device::getType() ) + ", " +
String( TNL::getType< IndexType >() ) + " >";
}
......
......@@ -50,7 +50,7 @@ String EllpackSymmetricGraph< Real, Device, Index > :: getType()
return String( "EllpackSymmetricGraph< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device::getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -34,7 +34,7 @@ String EllpackSymmetric< Real, Device, Index > :: getType()
return String( "EllpackSymmetric< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device::getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -34,7 +34,7 @@ String Ellpack< Real, Device, Index > :: getType()
return String( "Matrices::Ellpack< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( ", " ) +
String( TNL::getType< Index >() ) +
String( " >" );
......@@ -130,7 +130,7 @@ template< typename Real,
Index Ellpack< Real, Device, Index >::getNonZeroRowLength( const IndexType row ) const
{
ConstMatrixRow matrixRow = getRow( row );
return matrixRow.getNonZeroElementsCount( Device::getDeviceType() );
return matrixRow.getNonZeroElementsCount( Device::getType() );
}
template< typename Real,
......
......@@ -36,7 +36,7 @@ String Multidiagonal< Real, Device, Index > :: getType()
return String( "Matrices::Multidiagonal< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -36,7 +36,7 @@ String SlicedEllpackSymmetricGraph< Real, Device, Index, SliceSize >::getType()
return String( "SlicedEllpackSymmetricGraph< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device::getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -35,7 +35,7 @@ String SlicedEllpackSymmetric< Real, Device, Index, SliceSize >::getType()
return String( "SlicedEllpackSymmetric< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......
......@@ -35,7 +35,7 @@ String SlicedEllpack< Real, Device, Index, SliceSize >::getType()
return String( "Matrices::SlicedEllpack< ") +
String( TNL::getType< Real >() ) +
String( ", " ) +
Device :: getDeviceType() +
Device::getType() +
String( " >" );
}
......@@ -129,7 +129,7 @@ template< typename Real,
Index SlicedEllpack< Real, Device, Index, SliceSize >::getNonZeroRowLength( const IndexType row ) const
{
ConstMatrixRow matrixRow = getRow( row );
return matrixRow.getNonZeroElementsCount( Device::getDeviceType() );
return matrixRow.getNonZeroElementsCount( Device::getType() );
}
template< typename Real,
......
......@@ -34,7 +34,7 @@ String Tridiagonal< Real, Device, Index >::getType()
{
return String( "Matrices::Tridiagonal< " ) +
String( TNL::getType< RealType >() ) + ", " +
String( Device :: getDeviceType() ) + ", " +
String( Device::getType() ) + ", " +
String( TNL::getType< IndexType >() ) + " >";
}
......
......@@ -52,7 +52,7 @@ String Grid< 1, Real, Device, Index >::getType()
return String( "Meshes::Grid< " ) +
convertToString( getMeshDimension() ) + ", " +
String( TNL::getType< RealType >() ) + ", " +
String( Device::getDeviceType() ) + ", " +
String( Device::getType() ) + ", " +
String( TNL::getType< IndexType >() ) + " >";
}
......
......@@ -59,7 +59,7 @@ String Grid< 2, Real, Device, Index > :: getType()
return String( "Meshes::Grid< " ) +
convertToString( getMeshDimension() ) + ", " +
String( TNL::getType< RealType >() ) + ", " +
String( Device :: getDeviceType() ) + ", " +
String( Device::getType() ) + ", " +
String( TNL::getType< IndexType >() ) + " >";
}
......
......@@ -73,7 +73,7 @@ String Grid< 3, Real, Device, Index > :: getType()
return String( "Meshes::Grid< " ) +
convertToString( getMeshDimension() ) + ", " +
String( TNL::getType< RealType >() ) + ", " +
String( Device :: getDeviceType() ) + ", " +
String( Device::getType() ) + ", " +
String( TNL::getType< IndexType >() ) + " >";
}
......
......@@ -334,9 +334,9 @@ MeshTypeResolver< Reader, ConfigTag, Device, ProblemSetter, ProblemSetterArgs...
resolveTerminate( const Reader& reader,
ProblemSetterArgs&&... problemSetterArgs )
{
std::cerr << "The mesh config type " << TNL::getType< MeshConfig >() << " is disabled in the build configuration for device " << Device::getDeviceType() << "." << std::endl;
std::cerr << "The mesh config type " << TNL::getType< MeshConfig >() << " is disabled in the build configuration for device " << Device::getType() << "." << std::endl;
return false;
};
}
template< typename Reader,
typename ConfigTag,
......@@ -352,7 +352,7 @@ resolveTerminate( const Reader& reader,
{
using MeshType = Meshes::Mesh< MeshConfig, Device >;
return ProblemSetter< MeshType >::run( std::forward<ProblemSetterArgs>(problemSetterArgs)... );
};
}
} // namespace Meshes
} // namespace TNL
......@@ -481,7 +481,7 @@ struct Formatter< Pointers::DevicePointer< Object, Device > >
printToString( const Pointers::DevicePointer< Object, Device >& value )
{
::std::stringstream ss;
ss << "(DevicePointer< " << Object::getType() << ", " << Device::getDeviceType()
ss << "(DevicePointer< " << Object::getType() << ", " << Device::getType()
<< " > object at " << &value << ")";
return ss.str();
}
......
......@@ -59,7 +59,7 @@ struct Formatter< Pointers::SharedPointer< Object, Device > >
printToString( const Pointers::SharedPointer< Object, Device >& value )
{
::std::stringstream ss;
ss << "(SharedPointer< " << Object::getType() << ", " << Device::getDeviceType()
ss << "(SharedPointer< " << Object::getType() << ", " << Device::getType()
<< " > object at " << &value << ")";
return ss.str();
}
......
......@@ -322,7 +322,7 @@ struct Formatter< Pointers::UniquePointer< Object, Device > >
printToString( const Pointers::UniquePointer< Object, Device >& value )
{
::std::stringstream ss;
ss << "(UniquePointer< " << Object::getType() << ", " << Device::getDeviceType()
ss << "(UniquePointer< " << Object::getType() << ", " << Device::getType()
<< " > object at " << &value << ")";
return ss.str();
}
......
......@@ -28,7 +28,7 @@ getType()
return String( "PDEProblem< " ) +
Mesh::getType() + ", " +
TNL::getType< Real >() + ", " +
Device::getDeviceType() + ", " +
Device::getType() + ", " +
TNL::getType< Index >() + " >";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment