Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94100573
simd_math_avx512f.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Dec 3, 22:06
Size
877 B
Mime Type
text/x-c
Expires
Thu, Dec 5, 22:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22736078
Attached To
R1448 Lenstool-HPC
simd_math_avx512f.h
View Options
#ifndef SIMD_MATH
#define SIMD_MATH_
//
#include <immintrin.h>
//
//
//
#ifdef __INTEL_COMPILER
//
//#warning "simd_math AVX512F detected"
inline
__m512d
operator
+
(
__m512d
a
,
__m512d
b
)
{
return
_mm512_add_pd
(
a
,
b
);}
inline
__m512d
operator
-
(
__m512d
a
,
__m512d
b
)
{
return
_mm512_sub_pd
(
a
,
b
);}
inline
__m512d
operator
*
(
__m512d
a
,
__m512d
b
)
{
return
_mm512_mul_pd
(
a
,
b
);}
inline
__m512d
operator
/
(
__m512d
a
,
__m512d
b
)
{
return
_mm512_div_pd
(
a
,
b
);}
#endif
#define __INV RCP_2NR_AVX512
//#define __INV _mm512_rcp28_pd
//#define __INV _mm512_rcp14_pd
#define __SQRT _mm512_sqrt_pd
//
//
//
inline
__m512d
RCP_2NR_AVX512
(
const
__m512d
d
)
{
__m512d
x0
;
//x0 = _mm512_div_pd(_mm512_set1_pd(1.), d);
//return x0;
x0
=
_mm512_rcp28_pd
(
d
);
//
x0
=
x0
+
x0
-
d
*
x0
*
x0
;
x0
=
x0
+
x0
-
d
*
x0
*
x0
;
//
return
x0
;
}
//
//
//
#endif
Event Timeline
Log In to Comment