Commit 6963726f authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Added missing __cuda_callable__ marks for operators on tnlStaticArray

parent 4863455a
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -64,15 +64,19 @@ class tnlStaticArray
   __cuda_callable__
   Element& operator[]( int i );

   __cuda_callable__
   tnlStaticArray< Size, Element >& operator = ( const tnlStaticArray< Size, Element >& array );

   template< typename Array >
   __cuda_callable__
   tnlStaticArray< Size, Element >& operator = ( const Array& array );

   template< typename Array >
   __cuda_callable__
   bool operator == ( const Array& array ) const;

   template< typename Array >
   __cuda_callable__
   bool operator != ( const Array& array ) const;

   void setValue( const ElementType& val );
@@ -134,15 +138,19 @@ class tnlStaticArray< 1, Element >
   __cuda_callable__
   const Element& x() const;

   __cuda_callable__
   tnlStaticArray< 1, Element >& operator = ( const tnlStaticArray< 1, Element >& array );

   template< typename Array >
   __cuda_callable__
   tnlStaticArray< 1, Element >& operator = ( const Array& array );

   template< typename Array >
   __cuda_callable__
   bool operator == ( const Array& array ) const;

   template< typename Array >
   __cuda_callable__
   bool operator != ( const Array& array ) const;

   void setValue( const ElementType& val );
@@ -215,15 +223,19 @@ class tnlStaticArray< 2, Element >
   __cuda_callable__
   const Element& y() const;

   __cuda_callable__
   tnlStaticArray< 2, Element >& operator = ( const tnlStaticArray< 2, Element >& array );

   template< typename Array >
   __cuda_callable__
   tnlStaticArray< 2, Element >& operator = ( const Array& array );

   template< typename Array >
   __cuda_callable__
   bool operator == ( const Array& array ) const;

   template< typename Array >
   __cuda_callable__
   bool operator != ( const Array& array ) const;

   void setValue( const ElementType& val );
@@ -304,15 +316,19 @@ class tnlStaticArray< 3, Element >
   __cuda_callable__
   const Element& z() const;

   __cuda_callable__
   tnlStaticArray< 3, Element >& operator = ( const tnlStaticArray< 3, Element >& array );

   template< typename Array >
   __cuda_callable__
   tnlStaticArray< 3, Element >& operator = ( const Array& array );

   template< typename Array >
   __cuda_callable__
   bool operator == ( const Array& array ) const;

   template< typename Array >
   __cuda_callable__
   bool operator != ( const Array& array ) const;

   void setValue( const ElementType& val );
+4 −0
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ const Element& tnlStaticArray< 1, Element >::x() const
}

template< typename Element >
__cuda_callable__
tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const tnlStaticArray< 1, Element >& array )
{
   data[ 0 ] = array[ 0 ];
@@ -119,6 +120,7 @@ tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const t

template< typename Element >
   template< typename Array >
__cuda_callable__
tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const Array& array )
{
   data[ 0 ] = array[ 0 ];
@@ -127,6 +129,7 @@ tnlStaticArray< 1, Element >& tnlStaticArray< 1, Element >::operator = ( const A

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 1, Element >::operator == ( const Array& array ) const
{
   return( ( int ) size == ( int ) Array::size && data[ 0 ] == array[ 0 ] );
@@ -134,6 +137,7 @@ bool tnlStaticArray< 1, Element >::operator == ( const Array& array ) const

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 1, Element >::operator != ( const Array& array ) const
{
   return ! this->operator == ( array );
+4 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ const Element& tnlStaticArray< 2, Element >::y() const
}

template< typename Element >
__cuda_callable__
tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const tnlStaticArray< 2, Element >& array )
{
   data[ 0 ] = array[ 0 ];
@@ -145,6 +146,7 @@ tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const t

template< typename Element >
   template< typename Array >
__cuda_callable__
tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const Array& array )
{
   data[ 0 ] = array[ 0 ];
@@ -154,6 +156,7 @@ tnlStaticArray< 2, Element >& tnlStaticArray< 2, Element >::operator = ( const A

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 2, Element >::operator == ( const Array& array ) const
{
   return( ( int ) size == ( int ) Array::size &&
@@ -163,6 +166,7 @@ bool tnlStaticArray< 2, Element >::operator == ( const Array& array ) const

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 2, Element >::operator != ( const Array& array ) const
{
   return ! this->operator == ( array );
+4 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ const Element& tnlStaticArray< 3, Element >::z() const
   return data[ 2 ];
}
template< typename Element >
__cuda_callable__
tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const tnlStaticArray< 3, Element >& array )
{
   data[ 0 ] = array[ 0 ];
@@ -163,6 +164,7 @@ tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const t

template< typename Element >
   template< typename Array >
__cuda_callable__
tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const Array& array )
{
   data[ 0 ] = array[ 0 ];
@@ -173,6 +175,7 @@ tnlStaticArray< 3, Element >& tnlStaticArray< 3, Element >::operator = ( const A

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 3, Element >::operator == ( const Array& array ) const
{
   return( ( int ) size == ( int ) Array::size &&
@@ -183,6 +186,7 @@ bool tnlStaticArray< 3, Element >::operator == ( const Array& array ) const

template< typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< 3, Element >::operator != ( const Array& array ) const
{
   return ! this->operator == ( array );
+4 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ Element& tnlStaticArray< Size, Element >::operator[]( int i )
}

template< int Size, typename Element >
__cuda_callable__
tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( const tnlStaticArray< Size, Element >& array )
{
   for( int i = 0; i < size; i++ )
@@ -109,6 +110,7 @@ tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( c

template< int Size, typename Element >
   template< typename Array >
__cuda_callable__
tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( const Array& array )
{
   for( int i = 0; i < size; i++ )
@@ -118,6 +120,7 @@ tnlStaticArray< Size, Element >& tnlStaticArray< Size, Element >::operator = ( c

template< int Size, typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< Size, Element >::operator == ( const Array& array ) const
{
   if( ( int ) size != ( int ) Array::size )
@@ -130,6 +133,7 @@ bool tnlStaticArray< Size, Element >::operator == ( const Array& array ) const

template< int Size, typename Element >
   template< typename Array >
__cuda_callable__
bool tnlStaticArray< Size, Element >::operator != ( const Array& array ) const
{
   return ! this->operator == ( array );