Loading src/core/tnlLongVector.h +8 −1 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ template< class T > class tnlLongVector : public tnlObject /*! This is not clear from the OOP point of view however it is necessary for keeping good performance of derived numerical structure like solvers. */ // TODO: return zero pointer if size == 0 const T* Data() const { return data; Loading Loading @@ -138,7 +139,13 @@ template< class T > class tnlLongVector : public tnlObject return data[ i ]; }; void Zeros() void Zeros() // TODO: replace by setValue { int i; for( i = 0; i < size; i ++ ) data[ i ] = ( T ) 0; }; void setValue( const T& v ) { int i; for( i = 0; i < size; i ++ ) data[ i ] = ( T ) 0; Loading src/core/tnlLongVectorCUDA.h +4 −0 Original line number Diff line number Diff line Loading @@ -178,12 +178,16 @@ template< class T > class tnlLongVectorCUDA : public tnlObject */ const T* Data() const { if( ! size ) return NULL; return data; }; //! Returns pointer to data T* Data() { if( ! size ) return NULL; return data; } Loading Loading
src/core/tnlLongVector.h +8 −1 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ template< class T > class tnlLongVector : public tnlObject /*! This is not clear from the OOP point of view however it is necessary for keeping good performance of derived numerical structure like solvers. */ // TODO: return zero pointer if size == 0 const T* Data() const { return data; Loading Loading @@ -138,7 +139,13 @@ template< class T > class tnlLongVector : public tnlObject return data[ i ]; }; void Zeros() void Zeros() // TODO: replace by setValue { int i; for( i = 0; i < size; i ++ ) data[ i ] = ( T ) 0; }; void setValue( const T& v ) { int i; for( i = 0; i < size; i ++ ) data[ i ] = ( T ) 0; Loading
src/core/tnlLongVectorCUDA.h +4 −0 Original line number Diff line number Diff line Loading @@ -178,12 +178,16 @@ template< class T > class tnlLongVectorCUDA : public tnlObject */ const T* Data() const { if( ! size ) return NULL; return data; }; //! Returns pointer to data T* Data() { if( ! size ) return NULL; return data; } Loading