Changeset 533 for trunk


Ignore:
Timestamp:
Jul 25, 2010, 1:45:30 PM (9 years ago)
Author:
cameron
Message:

PTEST option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/sse_simd.h

    r469 r533  
    2424#ifdef USE_LDDQU
    2525#include <pmmintrin.h>
     26#endif
     27#ifdef USE_PTEST
     28#include <smmintrin.h>
    2629#endif
    2730typedef __m128i SIMD_type;
     
    210213#define simd_cmpgt_8(v1,v2) _mm_cmpgt_epi8(v1, v2)
    211214
     215
    212216static inline int bitblock_has_bit(SIMD_type v) {
     217#ifndef USE_PTEST
    213218  return !simd_all_true_8(simd_eq_8(v, simd_const_8(0)));
     219#endif
     220#ifdef USE_PTEST
     221  return !_mm_testz_si128(v,v);
     222#endif
    214223}
    215224
Note: See TracChangeset for help on using the changeset viewer.