Commit 1d1859fc authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixing tests for containers

parent 82d1352e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ class ArrayOperations< Devices::Cuda >
   template< typename Element >
   static Element getMemoryElement( const Element* data );

   // TODO: does not make sense for CUDA - remove?
   template< typename Element, typename Index >
   static Element& getArrayElementReference( Element* data, const Index i );

+3 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ Array( Array< Element, Device, Index >& array,
  allocationPointer( array.allocationPointer ),
  referenceCounter( 0 )
{
   TNL_ASSERT_TRUE( array.getData(), "Empty arrays cannot be bound." );
   TNL_ASSERT_LT( begin, array.getSize(), "Begin of array is out of bounds." );
   TNL_ASSERT_LE( begin + size, array.getSize(), "End of array is out of bounds." );

@@ -213,6 +214,7 @@ Array< Element, Device, Index >::
bind( Element* data,
      const Index size )
{
   TNL_ASSERT_TRUE( data, "Null pointer cannot be bound." );
   this->releaseData();
   this->data = data;
   this->size = size;
@@ -232,6 +234,7 @@ bind( const ArrayT& array,
   static_assert( std::is_same< Element, typename ArrayT::ElementType >::value, "ElementType of both arrays must be the same." );
   static_assert( std::is_same< Device, typename ArrayT::DeviceType >::value, "DeviceType of both arrays must be the same." );
   static_assert( std::is_same< Index, typename ArrayT::IndexType >::value, "IndexType of both arrays must be the same." );
   TNL_ASSERT_TRUE( array.getData(), "Empty array cannot be bound." );
   TNL_ASSERT_LT( begin, array.getSize(), "Begin of array is out of bounds." );
   TNL_ASSERT_LE( begin + size, array.getSize(), "End of array is out of bounds." );

+0 −7
Original line number Diff line number Diff line
@@ -16,10 +16,6 @@
namespace TNL {
namespace Containers {   

//! Aliases for the coordinates
// TODO: Remove this - it is here only because of some legact code
enum { tnlX = 0, tnlY, tnlZ };

template< int Size, typename Element >
class StaticArray
{
@@ -91,7 +87,6 @@ class StaticArray

   protected:
   Element data[ Size ];

};

template< typename Element >
@@ -365,7 +360,6 @@ class StaticArray< 3, Element >

   protected:
   Element data[ size ];

};

template< int Size, typename Element >
@@ -378,4 +372,3 @@ std::ostream& operator << ( std::ostream& str, const StaticArray< Size, Element
#include <TNL/Containers/StaticArray1D_impl.h>
#include <TNL/Containers/StaticArray2D_impl.h>
#include <TNL/Containers/StaticArray3D_impl.h>
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#pragma once

#include <TNL/param-types.h>
#include <TNL/Containers/StaticArray.h>

namespace TNL {
namespace Containers {   
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@

#include <TNL/param-types.h>
#include <TNL/Math.h>
#include <TNL/Containers/StaticArray.h>

namespace TNL {
namespace Containers {   
Loading