Ignore:
Timestamp:
Dec 22, 2011, 8:33:21 PM (8 years ago)
Author:
cameron
Message:

New store/load op syntax

File:
1 edited

Legend:

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

    r1767 r1807  
    9797public:
    9898        static IDISA_ALWAYS_INLINE bitblock128_t sll(bitblock128_t arg1, bitblock128_t arg2);
    99         static IDISA_ALWAYS_INLINE bitblock128_t load_unaligned(bitblock128_t* arg1);
     99        static IDISA_ALWAYS_INLINE bitblock128_t load_unaligned(const bitblock128_t* arg1);
    100100        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
    101101        static IDISA_ALWAYS_INLINE bitblock128_t srl(bitblock128_t arg1, bitblock128_t arg2);
    102         static IDISA_ALWAYS_INLINE void store_aligned(bitblock128_t* arg1, bitblock128_t arg2);
     102        static IDISA_ALWAYS_INLINE void store_aligned(bitblock128_t arg1, bitblock128_t* arg2);
    103103        static IDISA_ALWAYS_INLINE bool all(bitblock128_t arg1);
    104104        static IDISA_ALWAYS_INLINE bool any(bitblock128_t arg1);
    105105        static IDISA_ALWAYS_INLINE uint64_t popcount(bitblock128_t arg1);
    106106        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
    107         static IDISA_ALWAYS_INLINE bitblock128_t load_aligned(bitblock128_t* arg1);
    108         static IDISA_ALWAYS_INLINE void store_unaligned(bitblock128_t* arg1, bitblock128_t arg2);
     107        static IDISA_ALWAYS_INLINE bitblock128_t load_aligned(const bitblock128_t* arg1);
     108        static IDISA_ALWAYS_INLINE void store_unaligned(bitblock128_t arg1, bitblock128_t* arg2);
    109109};
    110110
     
    29962996
    29972997//The total number of operations is 1.0
    2998 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_unaligned(bitblock128_t* arg1)
     2998IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_unaligned(const bitblock128_t* arg1)
    29992999{
    30003000        return _mm_loadu_si128((bitblock128_t*)(arg1));
     
    30083008
    30093009//The total number of operations is 1.0
    3010 IDISA_ALWAYS_INLINE void bitblock128::store_aligned(bitblock128_t* arg1, bitblock128_t arg2)
    3011 {
    3012         _mm_store_si128((bitblock128_t*)(arg1), arg2);
     3010IDISA_ALWAYS_INLINE void bitblock128::store_aligned(bitblock128_t arg1, bitblock128_t* arg2)
     3011{
     3012        _mm_store_si128((bitblock128_t*)(arg2), arg1);
    30133013}
    30143014
     
    30443044
    30453045//The total number of operations is 1.0
    3046 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_aligned(bitblock128_t* arg1)
     3046IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_aligned(const bitblock128_t* arg1)
    30473047{
    30483048        return _mm_load_si128((bitblock128_t*)(arg1));
     
    30503050
    30513051//The total number of operations is 1.0
    3052 IDISA_ALWAYS_INLINE void bitblock128::store_unaligned(bitblock128_t* arg1, bitblock128_t arg2)
    3053 {
    3054         _mm_storeu_si128((bitblock128_t*)(arg1), arg2);
     3052IDISA_ALWAYS_INLINE void bitblock128::store_unaligned(bitblock128_t arg1, bitblock128_t* arg2)
     3053{
     3054        _mm_storeu_si128((bitblock128_t*)(arg2), arg1);
    30553055}
    30563056
Note: See TracChangeset for help on using the changeset viewer.