mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 19:57:48 +02:00
suppress USE_AVX, make it autodetectable on runtime
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
7e874eaa7c
commit
07ff165a8f
10 changed files with 17 additions and 41 deletions
|
@ -825,10 +825,12 @@ namespace data
|
|||
return key;
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#pragma GCC target("avx")
|
||||
#endif
|
||||
XORMetric operator^(const IdentHash& key1, const IdentHash& key2)
|
||||
{
|
||||
XORMetric m;
|
||||
#ifdef __AVX__
|
||||
if(i2p::cpu::avx)
|
||||
{
|
||||
__asm__
|
||||
|
@ -843,7 +845,6 @@ namespace data
|
|||
);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const uint64_t * hash1 = key1.GetLL (), * hash2 = key2.GetLL ();
|
||||
m.metric_ll[0] = hash1[0] ^ hash2[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue