Commit ebdfc4cd authored by Vít Hanousek's avatar Vít Hanousek
Browse files

Implemented tnlVector on MIC. (without OpenMP)

parent 2b407a76
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define	TNLFILE_IMPL_H

#include "tnlFile.h"
#include <core/tnlMIC.h>


template< typename Type, typename Device >
@@ -33,11 +34,6 @@ bool tnlFile :: write( const Type* buffer )
   return write< Type, Device, int >( buffer, 1 );
};

template< typename Type >
struct satanHider{
    Type *pointer;
};

template< typename Type, typename Device, typename Index >
bool tnlFile :: read( Type* buffer,
                      const Index& elements )
+4 −0
Original line number Diff line number Diff line
@@ -51,6 +51,10 @@ class tnlMIC
         }
};

template< typename Type >
struct satanHider{
    Type *pointer;
};

#endif /* TNLMIC_H */
+6 −4
Original line number Diff line number Diff line
@@ -244,7 +244,7 @@ class tnlVectorOperations< tnlCuda >
                                          const typename Vector::IndexType end );
};

/*
#ifdef HAVE_MIC
template<>
class tnlVectorOperations< tnlMIC >
{
@@ -351,10 +351,12 @@ class tnlVectorOperations< tnlMIC >
   static void computeExclusivePrefixSum( Vector& v,
                                          const typename Vector::IndexType begin,
                                          const typename Vector::IndexType end );
};*/
};
#endif

#include <core/vectors/tnlVectorOperationsHost_impl.h>
#include <core/vectors/tnlVectorOperationsCuda_impl.h>
//#include <core/vectors/tnlVectorOperationsMIC_impl.h>

#ifdef HAVE_MIC
#include <core/vectors/tnlVectorOperationsMIC_impl.h>
#endif
#endif /* TNLVECTOROPERATIONS_H_ */
+1 −1
Original line number Diff line number Diff line
@@ -452,7 +452,7 @@ addVectors( Vector1& v,
#pragma omp parallel for if( tnlHost::isOMPEnabled() && n > OpenMPVectorOperationsThreshold ) // TODO: check this threshold
#endif           
      for( Index i = 0; i < n; i ++ )
         v[ i ] = thisMultiplicator * v[ i ] * multiplicator1 * v1[ i ] + multiplicator2 * v2[ i ];
         v[ i ] = thisMultiplicator * v[ i ] + multiplicator1 * v1[ i ] + multiplicator2 * v2[ i ];  //BUG?
}

template< typename Vector >
+274 −144

File changed.

Preview size limit exceeded, changes collapsed.

Loading