Commit bb04a590 authored by Jakub Klinkovský's avatar Jakub Klinkovský

Style changes in StaticArray

parent db254ee8
...@@ -52,10 +52,10 @@ template< typename StaticArray, ...@@ -52,10 +52,10 @@ template< typename StaticArray,
struct StaticArrayAssignment< StaticArray, T, true > struct StaticArrayAssignment< StaticArray, T, true >
{ {
__cuda_callable__ __cuda_callable__
static void assign( StaticArray& a, const T& t ) static void assign( StaticArray& a, const T& v )
{ {
static_assert( StaticArray::getSize() == T::getSize(), "Cannot assign static arrays with different size." ); static_assert( StaticArray::getSize() == T::getSize(), "Cannot assign static arrays with different size." );
StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignArrayFunctor{}, a.getData(), t ); StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignArrayFunctor{}, a.getData(), v );
} }
}; };
...@@ -68,9 +68,9 @@ template< typename StaticArray, ...@@ -68,9 +68,9 @@ template< typename StaticArray,
struct StaticArrayAssignment< StaticArray, T, false > struct StaticArrayAssignment< StaticArray, T, false >
{ {
__cuda_callable__ __cuda_callable__
static void assign( StaticArray& a, const T& t ) static void assign( StaticArray& a, const T& v )
{ {
StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignValueFunctor{}, a, t ); StaticFor< 0, StaticArray::getSize() >::exec( detail::AssignValueFunctor{}, a, v );
} }
}; };
......
...@@ -181,18 +181,18 @@ public: ...@@ -181,18 +181,18 @@ public:
StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array ); StaticArray< Size, Value >& operator=( const StaticArray< Size, Value >& array );
/** /**
* \brief Assigns an object \e t of type \e T. * \brief Assigns an object \e v of type \e T.
* *
* T can be: * T can be:
* *
* 1. Static linear container implementing operator[] and having the same size. * 1. Static linear container implementing operator[] and having the same size.
* In this case, \e t is copied to this array elementwise. * In this case, \e v is copied to this array elementwise.
* 2. An object that can be converted to \e Value type. In this case all elements * 2. An object that can be converted to \e Value type. In this case all elements
* are set to \e t. * are set to \e v.
*/ */
template< typename T > template< typename T >
__cuda_callable__ __cuda_callable__
StaticArray< Size, Value >& operator=( const T& t ); StaticArray< Size, Value >& operator=( const T& v );
/** /**
* \brief This function checks whether this static array is equal to another \e array. * \brief This function checks whether this static array is equal to another \e array.
......
...@@ -224,7 +224,6 @@ TYPED_TEST( StaticArrayTest, AssignmentOperator ) ...@@ -224,7 +224,6 @@ TYPED_TEST( StaticArrayTest, AssignmentOperator )
u3 = 1; u3 = 1;
for( int i = 0; i < size; i++ ) for( int i = 0; i < size; i++ )
EXPECT_EQ( u3[ i ], 1 ); EXPECT_EQ( u3[ i ], 1 );
} }
TYPED_TEST( StaticArrayTest, setValue ) TYPED_TEST( StaticArrayTest, setValue )
......
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