]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/tracking-ca/MemoryAssignmentHelpers.h
update of the GPU tracker
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / MemoryAssignmentHelpers.h
index 5fe6692ff86bf05e00eaa66d06b929a373d20d5a..0d8912a5042d7212a2a5094b4370cc4dc8d1c077 100644 (file)
@@ -61,7 +61,7 @@ template<typename T, unsigned int Alignment> static inline T *AssignMemory( char
 template<typename T, unsigned int Alignment> GPUhd() static T *_assignMemory( char *&mem, unsigned int size )
 {
   STATIC_ASSERT( ( Alignment & ( Alignment - 1 ) ) == 0, Alignment_needs_to_be_a_multiple_of_2 );
-  AlignTo<Alignment>( mem );
+  AlignTo<Alignment < sizeof( HLTCA_GPU_ROWALIGNMENT ) ? sizeof( HLTCA_GPU_ROWALIGNMENT ) : Alignment>( mem );
   T *r = reinterpret_cast<T *>( mem );
   mem += size * sizeof( T );
   return r;
@@ -69,7 +69,7 @@ template<typename T, unsigned int Alignment> GPUhd() static T *_assignMemory( ch
 
 template<typename T> GPUhd() static inline void AssignMemory( T *&dst, char *&mem, int count )
 {
-  dst = _assignMemory < T, ( sizeof( T ) & ( sizeof( T ) - 1 ) ) == 0 && sizeof( T ) <= 16 ? sizeof( T ) : sizeof( void * ) > ( mem, count );
+       dst = _assignMemory < T, ( sizeof( T ) & ( sizeof( T ) - 1 ) ) == 0 && sizeof( T ) <= 16 ? sizeof( T ) : sizeof( void * ) > ( mem, count );
 }
 
 #endif // MEMORYASSIGNMENTHELPERS_H