Using Mustafa's function _may_i_use_cpu_feature() for AVX check
This commit is contained in:
parent
53895e15cd
commit
37f107cb3a
|
|
@ -33,6 +33,7 @@ using namespace std;
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
cout << "AVX supported? " << _may_i_use_cpu_feature(_FEATURE_AVX) << endl ;
|
||||
#define BATCH_SIZE 10000
|
||||
if(argc < 2)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,14 +46,15 @@ float ContextBase<float>::matchToMatchProb[((MAX_QUAL + 1) * (MAX_QUAL + 2)) >>
|
|||
|
||||
bool is_avx_supported()
|
||||
{
|
||||
int ecx = 0, edx = 0, ebx = 0;
|
||||
__asm__("cpuid"
|
||||
: "=b" (ebx),
|
||||
"=c" (ecx),
|
||||
"=d" (edx)
|
||||
: "a" (1)
|
||||
);
|
||||
return ((ecx >> 28)&1) == 1;
|
||||
return (_may_i_use_cpu_feature(_FEATURE_AVX) > 0);
|
||||
//int ecx = 0, edx = 0, ebx = 0;
|
||||
//__asm__("cpuid"
|
||||
//: "=b" (ebx),
|
||||
//"=c" (ecx),
|
||||
//"=d" (edx)
|
||||
//: "a" (1)
|
||||
//);
|
||||
//return ((ecx >> 28)&1) == 1;
|
||||
}
|
||||
|
||||
bool is_sse41_supported()
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue