Commit 78d15fb0 authored by Jakub Klinkovský's avatar Jakub Klinkovský

Cleanup

parent 1c07e0af
......@@ -14,7 +14,6 @@
#include <TNL/Assert.h>
#include <TNL/Math.h>
#include <TNL/ParallelFor.h>
#include <TNL/Containers/NDArray.h>
......
......@@ -125,7 +125,7 @@ public:
{
return "Atomic< " +
TNL::getType< T >() + ", " +
Devices::Host::getDeviceType() + " >";
Devices::Cuda::getDeviceType() + " >";
}
bool is_lock_free() const noexcept
......
/***************************************************************************
ArrayOperationsCuda_impl.h - description
ArrayOperationsCuda.hpp - description
-------------------
begin : Jul 16, 2013
copyright : (C) 2013 by Tomas Oberhuber
......
/***************************************************************************
ArrayOperationsHost_impl.h - description
ArrayOperationsHost.hpp - description
-------------------
begin : Jul 16, 2013
copyright : (C) 2013 by Tomas Oberhuber
......
/***************************************************************************
ArrayOperationsStatic_impl.h - description
ArrayOperationsStatic.hpp - description
-------------------
begin : Apr 8, 2019
copyright : (C) 2019 by Tomas Oberhuber et al.
......
/***************************************************************************
Multireduction_impl.h - description
Multireduction.hpp - description
-------------------
begin : May 13, 2016
copyright : (C) 2016 by Tomas Oberhuber et al.
......
......@@ -789,7 +789,7 @@ File& operator<<( File& file, const Array< Value, Device, Index, Allocator >& ar
saveObjectType( file, IO::getSerializationType() );
const Index size = array.getSize();
file.save( &size );
Algorithms::ArrayIO< Value, Device, Index >::save( file, array.getData(), array.getSize() );
IO::save( file, array.getData(), array.getSize() );
return file;
}
......@@ -813,7 +813,7 @@ File& operator>>( File& file, Array< Value, Device, Index, Allocator >& array )
if( _size < 0 )
throw Exceptions::FileDeserializationError( file.getFileName(), "invalid array size: " + std::to_string(_size) );
array.setSize( _size );
Algorithms::ArrayIO< Value, Device, Index >::load( file, array.getData(), array.getSize() );
IO::load( file, array.getData(), array.getSize() );
return file;
}
......
......@@ -11,7 +11,7 @@
#pragma once
#include <type_traits>
#include <TNL/Devices/Cuda.h>
#include <TNL/Devices/CudaCallable.h>
#include <TNL/Functions/MeshFunction.h>
#include <TNL/Solvers/PDE/BoundaryConditionsSetter.h>
......
......@@ -12,8 +12,9 @@
#pragma once
#include <type_traits>
#include <ostream>
#include <TNL/Devices/Cuda.h>
#include <TNL/Devices/CudaCallable.h>
namespace TNL {
namespace Matrices {
......@@ -23,7 +24,7 @@ class SparseRow
{
using RealType = Real;
using IndexType = Index;
public:
__cuda_callable__
......@@ -54,7 +55,7 @@ class SparseRow
__cuda_callable__
Index getLength() const;
__cuda_callable__
Index getNonZeroElementsCount() const;
......@@ -70,7 +71,7 @@ class SparseRow
};
template< typename Real, typename Index >
std::ostream& operator << ( std::ostream& str, const SparseRow< Real, Index >& row )
std::ostream& operator<<( std::ostream& str, const SparseRow< Real, Index >& row )
{
row.print( str );
return str;
......
......@@ -11,7 +11,6 @@
#pragma once
#include <TNL/Matrices/SparseRow.h>
#include <TNL/ParallelFor.h>
#include <TNL/Exceptions/NotImplementedError.h>
// Following includes are here to enable usage of std::vector and std::cout. To avoid having to include Device type (HOW would this be done anyway)
......@@ -19,7 +18,7 @@
#include <vector>
namespace TNL {
namespace Matrices {
namespace Matrices {
template< typename Real, typename Index >
__cuda_callable__
......@@ -137,18 +136,18 @@ getNonZeroElementsCount() const
// TODO: Fix/Implement
throw Exceptions::NotImplementedError( "TODO: Fix/Implement" );
// using NonConstIndex = typename std::remove_const< Index >::type;
//
//
// NonConstIndex elementCount ( 0 );
//
//
// for( NonConstIndex i = 0; i < length; i++ )
// {
//// std::cout << "this->values[ i * step ] = " << this->values[ i * step ] << " != 0.0" << std::endl;
// if( this->values[ i * step ] != 0.0 ) // Returns the same amount of elements in a row as does getRowLength() in ChunkedEllpack. WHY?
// elementCount++;
// }
//
//
//// std::cout << "Element Count = " << elementCount << "\n";
//
//
// return elementCount;
}
......
......@@ -10,8 +10,6 @@
#pragma once
#include <TNL/Devices/Host.h>
#include <TNL/Devices/Cuda.h>
#include <TNL/ParallelFor.h>
#include <TNL/Containers/StaticVector.h>
#include <TNL/Communicators/MPIPrint.h>
......
......@@ -10,8 +10,6 @@
#pragma once
#include <TNL/Devices/Host.h>
#include <TNL/Devices/Cuda.h>
#include <TNL/ParallelFor.h>
namespace TNL {
......
......@@ -426,15 +426,6 @@ hauseholder_generate( const int i,
if( i > 0 ) {
// aux = Y_{i-1}^T * y_i
RealType aux[ i ];
// Containers::Algorithms::ParallelReductionScalarProduct< RealType, RealType > scalarProduct;
// Containers::Algorithms::Multireduction< DeviceType >::reduce
// ( scalarProduct,
// i,
// size,
// Y.getData(),
// ldSize,
// Traits::getConstLocalView( y_i ).getData(),
// aux );
const RealType* _Y = Y.getData();
const RealType* _y_i = Traits::getConstLocalView( y_i ).getData();
const IndexType ldSize = this->ldSize;
......@@ -535,15 +526,6 @@ hauseholder_cwy_transposed( VectorViewType z,
{
// aux = Y_i^T * w
RealType aux[ i + 1 ];
// Containers::Algorithms::ParallelReductionScalarProduct< RealType, RealType > scalarProduct;
// Containers::Algorithms::Multireduction< DeviceType >::reduce
// ( scalarProduct,
// i + 1,
// size,
// Y.getData(),
// ldSize,
// Traits::getConstLocalView( w ).getData(),
// aux );
const RealType* _Y = Y.getData();
const RealType* _w = Traits::getConstLocalView( w ).getData();
const IndexType ldSize = this->ldSize;
......
......@@ -57,4 +57,4 @@ struct StaticFor< Begin, End, false >
}
};
} //namespace TNL
} // namespace TNL
......@@ -373,8 +373,8 @@ TYPED_TEST( ArrayViewTest, containsOnlyValue )
TYPED_TEST( ArrayViewTest, comparisonOperator )
{
using ArrayType = Array< double >;//typename TestFixture::ArrayType;
using ViewType = ArrayView< double >;//typename TestFixture::ViewType;
using ArrayType = typename TestFixture::ArrayType;
using ViewType = typename TestFixture::ViewType;
ArrayType a( 10 ), b( 10 );
typename ArrayType::HostType a_host( 10 );
......
......@@ -79,7 +79,6 @@ using DistributedVectorTypes = ::testing::Types<
TYPED_TEST_SUITE( DistributedVectorTest, DistributedVectorTypes );
#if 1
TYPED_TEST( DistributedVectorTest, prefixSum )
{
using RealType = typename TestFixture::DistributedVectorType::RealType;
......@@ -198,9 +197,7 @@ TYPED_TEST( DistributedVectorTest, prefixSum )
#endif
}
}
#endif
#if 1
TYPED_TEST( DistributedVectorTest, exclusivePrefixSum )
{
using RealType = typename TestFixture::DistributedVectorType::RealType;
......@@ -319,7 +316,6 @@ TYPED_TEST( DistributedVectorTest, exclusivePrefixSum )
#endif
}
}
#endif
#endif // HAVE_GTEST
......
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