mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 15:52:27 +03:00
Add cpu feature / target info "AVX512VBMI".
This commit is contained in:
committed by
Konstantinos Margaritis
parent
d96f1ab505
commit
b19a41528a
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017, Intel Corporation
|
||||
* Copyright (c) 2016-2020, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -40,8 +40,14 @@
|
||||
#define check_avx512() (0)
|
||||
#endif
|
||||
|
||||
#if defined(DISABLE_AVX512VBMI_DISPATCH)
|
||||
#define avx512vbmi_ disabled_
|
||||
#define check_avx512vbmi() (0)
|
||||
#endif
|
||||
|
||||
#define CREATE_DISPATCH(RTYPE, NAME, ...) \
|
||||
/* create defns */ \
|
||||
RTYPE JOIN(avx512vbmi_, NAME)(__VA_ARGS__); \
|
||||
RTYPE JOIN(avx512_, NAME)(__VA_ARGS__); \
|
||||
RTYPE JOIN(avx2_, NAME)(__VA_ARGS__); \
|
||||
RTYPE JOIN(corei7_, NAME)(__VA_ARGS__); \
|
||||
@@ -54,6 +60,9 @@
|
||||
\
|
||||
/* resolver */ \
|
||||
static RTYPE (*JOIN(resolve_, NAME)(void))(__VA_ARGS__) { \
|
||||
if (check_avx512vbmi()) { \
|
||||
return JOIN(avx512vbmi_, NAME); \
|
||||
} \
|
||||
if (check_avx512()) { \
|
||||
return JOIN(avx512_, NAME); \
|
||||
} \
|
||||
|
Reference in New Issue
Block a user