 Timestamp:
 Sep 9, 2013, 1:58:12 PM (5 years ago)
 Location:
 trunk/lib
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/bitblock256.hpp
r3451 r3453 97 97 98 98 IDISA_ALWAYS_INLINE bitblock256_t convert(uint64_t s) 99 { 100 ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0}; 101 b._64[0] = s; 102 return b._256; 99 { 100 return _mm256_castsi128_si256(_mm_cvtsi64_si128(s)); 101 // ubitblock b = {b._256 = simd256<128>::constant<0>()}; // = {0}; 102 // b._64[0] = s; 103 // return b._256; 103 104 } 104 105 … … 112 113 IDISA_ALWAYS_INLINE uint64_t convert(bitblock256_t v) 113 114 { 114 return (uint64_t) mvmd256<64>::extract<0>(v); 115 return (uint64_t) _mm_cvtsi128_si64(avx_select_lo128(v)); 116 // return (uint64_t) mvmd256<64>::extract<0>(v); 115 117 } 116 118 
trunk/lib/idisa_cpp/idisa_avx2.cpp
r3448 r3453 2504 2504 } 2505 2505 2506 //The total number of operations is 3.02506 //The total number of operations is 1.0 2507 2507 template <> IDISA_ALWAYS_INLINE FieldType<256/8>::T hsimd256<8>::signmask(bitblock256_t arg1) 2508 { 2509 return ((((uint64_t)(_mm_movemask_epi8(((__m128i)(avx_select_hi128(arg1))))))<<16)((uint64_t)(_mm_movemask_epi8(((__m128i)(avx_select_lo128(arg1)))))));2510 } 2511 2512 //The total number of operations is 6.02508 { 2509 return _mm256_movemask_epi8(arg1); 2510 } 2511 2512 //The total number of operations is 4.0 2513 2513 template <> IDISA_ALWAYS_INLINE FieldType<256/16>::T hsimd256<16>::signmask(bitblock256_t arg1) 2514 2514 { … … 2516 2516 } 2517 2517 2518 //The total number of operations is 9.02518 //The total number of operations is 2.0 2519 2519 template <> IDISA_ALWAYS_INLINE FieldType<256/32>::T hsimd256<32>::signmask(bitblock256_t arg1) 2520 2520 { 2521 return hsimd256<(16)>::signmask(hsimd256<32>::packss(simd256<32>::constant<0>(),arg1));2522 } 2523 2524 //The total number of operations is 75.52521 return _mm256_movemask_ps(_mm256_castsi256_ps(arg1)); 2522 } 2523 2524 //The total number of operations is 2.0 2525 2525 template <> IDISA_ALWAYS_INLINE FieldType<256/64>::T hsimd256<64>::signmask(bitblock256_t arg1) 2526 2526 { 2527 return hsimd256<(32)>::signmask(hsimd256<64>::packh(simd256<64>::constant<0>(),arg1));2528 } 2529 2530 //The total number of operations is 1 84.6666666672527 return _mm256_movemask_pd(_mm256_castsi256_pd(arg1)); 2528 } 2529 2530 //The total number of operations is 111.166666667 2531 2531 template <> IDISA_ALWAYS_INLINE FieldType<256/128>::T hsimd256<128>::signmask(bitblock256_t arg1) 2532 2532 { … … 2534 2534 } 2535 2535 2536 //The total number of operations is 1 97.6666666672536 //The total number of operations is 124.166666667 2537 2537 template <> IDISA_ALWAYS_INLINE FieldType<256/256>::T hsimd256<256>::signmask(bitblock256_t arg1) 2538 2538 {
Note: See TracChangeset
for help on using the changeset viewer.