Loading src/core/arrays/tnlArrayOperations.h +9 −11 Original line number Diff line number Diff line Loading @@ -157,20 +157,18 @@ class tnlArrayOperations< tnlHost, tnlCuda > }; template< typename Type1, typename Type2 > class tnlFastArrayOperations struct tnlFastArrayOperations { public: enum{ enabled = false }; }; template< typename Type > class tnlFastArrayOperations< Type, Type > { public: enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< char, char >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< int, int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< unsigned int, unsigned int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< long int, long int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< long unsigned int, long unsigned int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< float, float >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< double, double >{ enum{ enabled = true }; }; #include <implementation/core/arrays/tnlArrayOperationsHost_impl.h> Loading src/implementation/core/arrays/tnlArrayOperationsHost_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ bool tnlArrayOperations< tnlHost >::compareMemory( const DestinationElement* des } else for( Index i = 0; i < size; i ++ ) if( destination[ i ] != source[ i ] ) if( ! ( destination[ i ] == source[ i ] ) ) return false; return true; } Loading src/mesh/layers/tnlMeshStorageLayer.h +12 −3 Original line number Diff line number Diff line Loading @@ -145,6 +145,12 @@ class tnlMeshStorageLayer< ConfigTag, } } bool operator==( const tnlMeshStorageLayer& meshLayer ) const { return ( BaseType::operator==( meshLayer ) && entities == meshLayer.entities ); } protected: ContainerType entities; Loading Loading @@ -279,12 +285,15 @@ class tnlMeshStorageLayer< ConfigTag, str << "The mesh vertices are: " << endl; for( GlobalIndexType i = 0; i < vertices.getSize();i ++ ) { str << i << " \t ( "; vertices[ i ].print( str ); str << " ) " << endl; str << i << vertices[ i ] << endl; } } bool operator==( const tnlMeshStorageLayer& meshLayer ) const { return ( vertices == meshLayer.vertices ); } private: ContainerType vertices; Loading src/mesh/layers/tnlMeshSubentityStorageLayer.h +11 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,12 @@ class tnlMeshSubentityStorageLayer< ConfigTag, str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << subentitiesIndices << "."; } bool operator==( const tnlMeshSubentityStorageLayer& layer ) const { return ( BaseType::operator==( layer ) && subentitiesIndices == layer.subentitiesIndices ); } /**** * Make visible setters and getters of the lower subentities */ Loading Loading @@ -212,6 +218,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << this->verticesIndices << "."; } bool operator==( const tnlMeshSubentityStorageLayer& layer ) const { return ( verticesIndices == layer.verticesIndices ); } GlobalIndexType getSubentityIndex( DimensionsTraits, const LocalIndexType localIndex ) const { Loading src/mesh/layers/tnlMeshSuperentityStorageLayer.h +27 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const { BaseType::print( str ); str << endl << "\t Superentities with " << DimensionsTraits::value << " dimensions are: " << this->superentitiesIndices << "."; } bool operator==( const tnlMeshSuperentityStorageLayer& layer ) const { return ( BaseType::operator==( layer ) && superentitiesIndices == layer.superentitiesIndices ); } private: Loading Loading @@ -184,6 +192,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits > SuperentityTag; typedef tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits, tnlStorageTraits< false > > ThisType; protected: typedef typename SuperentityTag::ContainerType ContainerType; Loading @@ -204,6 +217,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const{} bool operator==( const ThisType& layer ) const { return true; } ContainerType& getSuperentitiesIndices(){} const ContainerType& getSuperentitiesIndices() const{} Loading @@ -221,6 +239,10 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, typedef tnlMeshSuperentitiesTraits< ConfigTag, EntityTag, DimensionsTraits > SuperentityTag; typedef tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits, tnlStorageTraits< true > > ThisType; protected: Loading @@ -242,6 +264,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const{} bool operator==( const ThisType& layer ) const { return true; } ContainerType& getSuperentitiesIndices(){} const ContainerType& getSuperentitiesIndices() const{} Loading Loading
src/core/arrays/tnlArrayOperations.h +9 −11 Original line number Diff line number Diff line Loading @@ -157,20 +157,18 @@ class tnlArrayOperations< tnlHost, tnlCuda > }; template< typename Type1, typename Type2 > class tnlFastArrayOperations struct tnlFastArrayOperations { public: enum{ enabled = false }; }; template< typename Type > class tnlFastArrayOperations< Type, Type > { public: enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< char, char >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< int, int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< unsigned int, unsigned int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< long int, long int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< long unsigned int, long unsigned int >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< float, float >{ enum{ enabled = true }; }; template<> struct tnlFastArrayOperations< double, double >{ enum{ enabled = true }; }; #include <implementation/core/arrays/tnlArrayOperationsHost_impl.h> Loading
src/implementation/core/arrays/tnlArrayOperationsHost_impl.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ bool tnlArrayOperations< tnlHost >::compareMemory( const DestinationElement* des } else for( Index i = 0; i < size; i ++ ) if( destination[ i ] != source[ i ] ) if( ! ( destination[ i ] == source[ i ] ) ) return false; return true; } Loading
src/mesh/layers/tnlMeshStorageLayer.h +12 −3 Original line number Diff line number Diff line Loading @@ -145,6 +145,12 @@ class tnlMeshStorageLayer< ConfigTag, } } bool operator==( const tnlMeshStorageLayer& meshLayer ) const { return ( BaseType::operator==( meshLayer ) && entities == meshLayer.entities ); } protected: ContainerType entities; Loading Loading @@ -279,12 +285,15 @@ class tnlMeshStorageLayer< ConfigTag, str << "The mesh vertices are: " << endl; for( GlobalIndexType i = 0; i < vertices.getSize();i ++ ) { str << i << " \t ( "; vertices[ i ].print( str ); str << " ) " << endl; str << i << vertices[ i ] << endl; } } bool operator==( const tnlMeshStorageLayer& meshLayer ) const { return ( vertices == meshLayer.vertices ); } private: ContainerType vertices; Loading
src/mesh/layers/tnlMeshSubentityStorageLayer.h +11 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,12 @@ class tnlMeshSubentityStorageLayer< ConfigTag, str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << subentitiesIndices << "."; } bool operator==( const tnlMeshSubentityStorageLayer& layer ) const { return ( BaseType::operator==( layer ) && subentitiesIndices == layer.subentitiesIndices ); } /**** * Make visible setters and getters of the lower subentities */ Loading Loading @@ -212,6 +218,11 @@ class tnlMeshSubentityStorageLayer< ConfigTag, str << "\t Subentities with " << DimensionsTraits::value << " dimensions are: " << this->verticesIndices << "."; } bool operator==( const tnlMeshSubentityStorageLayer& layer ) const { return ( verticesIndices == layer.verticesIndices ); } GlobalIndexType getSubentityIndex( DimensionsTraits, const LocalIndexType localIndex ) const { Loading
src/mesh/layers/tnlMeshSuperentityStorageLayer.h +27 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,14 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const { BaseType::print( str ); str << endl << "\t Superentities with " << DimensionsTraits::value << " dimensions are: " << this->superentitiesIndices << "."; } bool operator==( const tnlMeshSuperentityStorageLayer& layer ) const { return ( BaseType::operator==( layer ) && superentitiesIndices == layer.superentitiesIndices ); } private: Loading Loading @@ -184,6 +192,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits > SuperentityTag; typedef tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits, tnlStorageTraits< false > > ThisType; protected: typedef typename SuperentityTag::ContainerType ContainerType; Loading @@ -204,6 +217,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const{} bool operator==( const ThisType& layer ) const { return true; } ContainerType& getSuperentitiesIndices(){} const ContainerType& getSuperentitiesIndices() const{} Loading @@ -221,6 +239,10 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, typedef tnlMeshSuperentitiesTraits< ConfigTag, EntityTag, DimensionsTraits > SuperentityTag; typedef tnlMeshSuperentityStorageLayer< ConfigTag, EntityTag, DimensionsTraits, tnlStorageTraits< true > > ThisType; protected: Loading @@ -242,6 +264,11 @@ class tnlMeshSuperentityStorageLayer< ConfigTag, void print( ostream& str ) const{} bool operator==( const ThisType& layer ) const { return true; } ContainerType& getSuperentitiesIndices(){} const ContainerType& getSuperentitiesIndices() const{} Loading