Re: memcpy test: results from adding sse and avx tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/6/18 9:43 AM, Sitsofe Wheeler wrote:
> On 6 March 2018 at 16:22, Jens Axboe <axboe@xxxxxxxxx> wrote:
>>
>> +##########################################
>> +# sse probe
>> +sse="no"
>> +cat > $TMPC << EOF
>> +#include <xmmintrin.h>
>> +#include <immintrin.h>
>> +int main(int argc, char **argv)
>> +{
>> +  __m128 val;
>> +  float const *src = NULL;
>> +  float *dst = NULL;
>> +  val = _mm_load_ps(src);
>> +  _mm_store_ps(dst, val);
>> +  return 0;
>> +}
>> +EOF
>> +if compile_prog "-msse" "" "sse"; then
>> +  sse="yes"
>> +fi
>> +print_config "SSE (compiler)" "$sse"
> 
> According to https://stackoverflow.com/questions/28939652/how-to-detect-sse-sse2-avx-avx2-avx-512-avx-128-fma-kcvi-availability-at-compile/28939692#28939692
> in gcc and clang you can just check for the appropriate define (e.g.
> __SSE2__ ) if you're only interested in what's available at compile
> time...

I never really trust that, since there are always cases where that
isn't true. A configure test with the meat of the code and types
is always going to be 100% reliable.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux