Loading src/core/arrays/tnlConstSharedArray.h +3 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,9 @@ class tnlConstSharedArray : public tnlObject const Index _size ); template< typename Array > void bind( const Array& array ); void bind( const Array& array, IndexType index = 0, IndexType size = 0 ); void swap( tnlConstSharedArray< Element, Device, Index >& array ); Loading src/core/arrays/tnlConstSharedArray_impl.h +11 −3 Original line number Diff line number Diff line Loading @@ -92,10 +92,18 @@ template< typename Element, typename Device, typename Index > template< typename Array > void tnlConstSharedArray< Element, Device, Index > :: bind( const Array& array ) void tnlConstSharedArray< Element, Device, Index > :: bind( const Array& array, IndexType index, IndexType size ) { tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType, "Attempt to bind arrays between different devices." ); this->data = &( array. getData()[ index ] ); if( ! size ) this->size = array. getSize(); this -> data = array. getData(); else this->size = size; }; template< typename Element, Loading src/core/arrays/tnlSharedArray.h +4 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,10 @@ class tnlSharedArray : public tnlObject void bind( Element* _data, const Index _size ); void bind( tnlArray< Element, Device, Index >& array ); template< typename Array > void bind( Array& array, IndexType index = 0, IndexType size = 0 ); template< int Size > void bind( tnlStaticArray< Size, Element >& array ); Loading src/core/arrays/tnlSharedArray_impl.h +13 −4 Original line number Diff line number Diff line Loading @@ -117,10 +117,19 @@ void tnlSharedArray< Element, Device, Index > :: bind( Element* data, template< typename Element, typename Device, typename Index > void tnlSharedArray< Element, Device, Index > :: bind( tnlArray< Element, Device, Index >& array ) { template< typename Array > void tnlSharedArray< Element, Device, Index > :: bind( Array& array, IndexType index, IndexType size ) { tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType, "Attempt to bind arrays between different devices." ); this->data = &( array. getData()[ index ] ); if( ! size ) this->size = array. getSize(); this->data = array. getData(); else this->size = size; }; template< typename Element, Loading src/core/vectors/tnlVector.h +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,8 @@ class tnlVector : public tnlArray< Real, Device, Index > // TODO: implement //tnlVector< Real, Device, Index >& operator *= ( const RealType& c ); //tnlVector< Real, Device, Index >& operator /= ( const RealType& c ); Real max() const; Real min() const; Loading Loading
src/core/arrays/tnlConstSharedArray.h +3 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,9 @@ class tnlConstSharedArray : public tnlObject const Index _size ); template< typename Array > void bind( const Array& array ); void bind( const Array& array, IndexType index = 0, IndexType size = 0 ); void swap( tnlConstSharedArray< Element, Device, Index >& array ); Loading
src/core/arrays/tnlConstSharedArray_impl.h +11 −3 Original line number Diff line number Diff line Loading @@ -92,10 +92,18 @@ template< typename Element, typename Device, typename Index > template< typename Array > void tnlConstSharedArray< Element, Device, Index > :: bind( const Array& array ) void tnlConstSharedArray< Element, Device, Index > :: bind( const Array& array, IndexType index, IndexType size ) { tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType, "Attempt to bind arrays between different devices." ); this->data = &( array. getData()[ index ] ); if( ! size ) this->size = array. getSize(); this -> data = array. getData(); else this->size = size; }; template< typename Element, Loading
src/core/arrays/tnlSharedArray.h +4 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,10 @@ class tnlSharedArray : public tnlObject void bind( Element* _data, const Index _size ); void bind( tnlArray< Element, Device, Index >& array ); template< typename Array > void bind( Array& array, IndexType index = 0, IndexType size = 0 ); template< int Size > void bind( tnlStaticArray< Size, Element >& array ); Loading
src/core/arrays/tnlSharedArray_impl.h +13 −4 Original line number Diff line number Diff line Loading @@ -117,10 +117,19 @@ void tnlSharedArray< Element, Device, Index > :: bind( Element* data, template< typename Element, typename Device, typename Index > void tnlSharedArray< Element, Device, Index > :: bind( tnlArray< Element, Device, Index >& array ) { template< typename Array > void tnlSharedArray< Element, Device, Index > :: bind( Array& array, IndexType index, IndexType size ) { tnlStaticAssert( Array::DeviceType::DeviceType == DeviceType::DeviceType, "Attempt to bind arrays between different devices." ); this->data = &( array. getData()[ index ] ); if( ! size ) this->size = array. getSize(); this->data = array. getData(); else this->size = size; }; template< typename Element, Loading
src/core/vectors/tnlVector.h +2 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,8 @@ class tnlVector : public tnlArray< Real, Device, Index > // TODO: implement //tnlVector< Real, Device, Index >& operator *= ( const RealType& c ); //tnlVector< Real, Device, Index >& operator /= ( const RealType& c ); Real max() const; Real min() const; Loading