Ignore:
Timestamp:
Feb 2, 2012, 2:05:04 PM (7 years ago)
Author:
lindanl
Message:

Define ATTRIBUTE_SIMD_ALIGN for MSVC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock.hpp

    r1903 r1908  
    2424#define BLOCK_SIZE 128
    2525#endif
    26 #define ATTRIBUTE_SIMD_ALIGN __attribute__((aligned(sizeof(BitBlock))))
     26#ifndef ATTRIBUTE_SIMD_ALIGN
     27    #if defined _MSC_VER
     28        #define ATTRIBUTE_SIMD_ALIGN __declspec(align(sizeof(BitBlock)))
     29    #elif defined __GNUC__
     30        #define ATTRIBUTE_SIMD_ALIGN __attribute__((aligned(sizeof(BitBlock))))
     31    #else
     32        #define ATTRIBUTE_SIMD_ALIGN
     33    #endif
     34#endif
    2735#define ASSERT_BITBLOCK_ALIGN(v) assert(0 == (((uint64_t)(&v)) & (sizeof(BitBlock)-1)) )
    2836
Note: See TracChangeset for help on using the changeset viewer.