GNU Radio's BLOCKSTREAM Package
avx_mathfun.h
Go to the documentation of this file.
1 /*
2  AVX implementation of sin, cos, sincos, exp and log
3 
4  Based on "sse_mathfun.h", by Julien Pommier
5  http://gruntthepeon.free.fr/ssemath/
6 
7  Copyright (C) 2012 Giovanni Garberoglio
8  Interdisciplinary Laboratory for Computational Science (LISC)
9  Fondazione Bruno Kessler and University of Trento
10  via Sommarive, 18
11  I-38123 Trento (Italy)
12 
13  This software is provided 'as-is', without any express or implied
14  warranty. In no event will the authors be held liable for any damages
15  arising from the use of this software.
16 
17  Permission is granted to anyone to use this software for any purpose,
18  including commercial applications, and to alter it and redistribute it
19  freely, subject to the following restrictions:
20 
21  1. The origin of this software must not be misrepresented; you must not
22  claim that you wrote the original software. If you use this software
23  in a product, an acknowledgment in the product documentation would be
24  appreciated but is not required.
25  2. Altered source versions must be plainly marked as such, and must not be
26  misrepresented as being the original software.
27  3. This notice may not be removed or altered from any source distribution.
28 
29  (this is the zlib license)
30 */
31 #ifdef __AVX__
32 #ifndef AVX_MATHFUN_H_
33 #define AVX_MATHFUN_H_
34 
35 #include <immintrin.h>
36 
37 typedef __m256 v8sf; // vector of 8 float (avx)
38 
39 // prototypes
40 inline v8sf log256_ps(v8sf x);
41 inline v8sf exp256_ps(v8sf x);
42 inline v8sf sin256_ps(v8sf x);
43 inline v8sf cos256_ps(v8sf x);
44 inline void sincos256_ps(v8sf x, v8sf *s, v8sf *c);
45 
46 #include "avx_mathfun.hxx"
47 
48 #endif
49 #endif