Ignore:
Timestamp:
Oct 24, 2011, 1:20:43 PM (8 years ago)
Author:
huah
Message:

fixed the bitblock::load/store for AVX; added testing modules for bitblock::srl/sll/srli/slli

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/idisa_cpp/idisa_avx.cpp

    r1580 r1584  
    8585{
    8686public:
    87         static IDISA_ALWAYS_INLINE bitblock256_t load_unaligned(bitblock256_t* arg1);
     87        static IDISA_ALWAYS_INLINE bitblock256_t load_unaligned(float const* arg1);
    8888        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock256_t srli(bitblock256_t arg1);
    89         static IDISA_ALWAYS_INLINE void store_aligned(bitblock256_t* arg1, bitblock256_t arg2);
     89        static IDISA_ALWAYS_INLINE void store_aligned(float* arg1, bitblock256_t arg2);
    9090        static IDISA_ALWAYS_INLINE bool all(bitblock256_t arg1);
    9191        static IDISA_ALWAYS_INLINE bool any(bitblock256_t arg1);
    9292        static IDISA_ALWAYS_INLINE uint64_t popcount(bitblock256_t arg1);
    9393        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock256_t slli(bitblock256_t arg1);
    94         static IDISA_ALWAYS_INLINE bitblock256_t load_aligned(bitblock256_t* arg1);
    95         static IDISA_ALWAYS_INLINE void store_unaligned(bitblock256_t* arg1, bitblock256_t arg2);
     94        static IDISA_ALWAYS_INLINE bitblock256_t load_aligned(float const* arg1);
     95        static IDISA_ALWAYS_INLINE void store_unaligned(float* arg1, bitblock256_t arg2);
    9696};
    9797
     
    33053305
    33063306//The total number of operations is 1
    3307 IDISA_ALWAYS_INLINE bitblock256_t bitblock256::load_unaligned(bitblock256_t* arg1)
    3308 {
    3309         return _mm256_loadu_ps((bitblock256_t*)(arg1));
     3307IDISA_ALWAYS_INLINE bitblock256_t bitblock256::load_unaligned(float const* arg1)
     3308{
     3309        return _mm256_loadu_ps((float const*)(arg1));
    33103310}
    33113311
     
    33173317
    33183318//The total number of operations is 1
    3319 IDISA_ALWAYS_INLINE void bitblock256::store_aligned(bitblock256_t* arg1, bitblock256_t arg2)
    3320 {
    3321         _mm256_store_ps((bitblock256_t*)(arg1), arg2);
     3319IDISA_ALWAYS_INLINE void bitblock256::store_aligned(float* arg1, bitblock256_t arg2)
     3320{
     3321        _mm256_store_ps((float*)(arg1), arg2);
    33223322}
    33233323
     
    33473347
    33483348//The total number of operations is 1
    3349 IDISA_ALWAYS_INLINE bitblock256_t bitblock256::load_aligned(bitblock256_t* arg1)
    3350 {
    3351         return _mm256_load_ps((bitblock256_t*)(arg1));
    3352 }
    3353 
    3354 //The total number of operations is 1
    3355 IDISA_ALWAYS_INLINE void bitblock256::store_unaligned(bitblock256_t* arg1, bitblock256_t arg2)
    3356 {
    3357         _mm256_storeu_ps((bitblock256_t*)(arg1), arg2);
     3349IDISA_ALWAYS_INLINE bitblock256_t bitblock256::load_aligned(float const* arg1)
     3350{
     3351        return _mm256_load_ps((float const*)(arg1));
     3352}
     3353
     3354//The total number of operations is 1
     3355IDISA_ALWAYS_INLINE void bitblock256::store_unaligned(float* arg1, bitblock256_t arg2)
     3356{
     3357        _mm256_storeu_ps((float*)(arg1), arg2);
    33583358}
    33593359
Note: See TracChangeset for help on using the changeset viewer.