AM_Math.h

Go to the documentation of this file.
00001 /*
00002  * Expression Template Matrix Library
00003  *
00004  * Copyright (C) 2004 - 2006 Ricky Lung <mtlung@users.sourceforge.net>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 
00030 #ifndef _EXMAT_SIMD_SSE_AM_MATH_H
00031 #define _EXMAT_SIMD_SSE_AM_MATH_H
00032 
00033 
00034 // Approximated math
00035 
00036 #include "../../Config.h"
00037 #include <stddef.h>
00038 #include <xmmintrin.h>
00039 
00040 #if EXMAT_ENABLE_SSE || EXMAT_ENABLE_SSE2
00041 
00042 namespace exmat {
00043 namespace Math {
00044 namespace SSE {
00045 
00046 
00048 
00049 extern float am_rcp_0(float x);
00050 extern __m128 am_rcp_0(__m128 x);
00051 extern void am_rcp_0(const float* in, float* out, size_t N);
00053 extern float am_rcp_1(float x);
00054 extern __m128 am_rcp_1(__m128 x);
00055 extern void am_rcp_1(const float* in, float* out, size_t N);
00057 
00058 
00060 
00061 extern float am_sqrt_0(float x);
00062 extern __m128 am_sqrt_0(__m128 x);
00063 extern void am_sqrt_0(const float* in, float* out, size_t N);
00064 extern float am_sqrt_1(float x);
00065 extern __m128 am_sqrt_1(__m128 x);
00066 extern void am_sqrt_1(const float* in, float* out, size_t N);
00067 extern float am_sqrt_2(float x);
00069 
00070 
00072 
00073 extern float am_rsqrt_0(float x);
00074 extern __m128 am_rsqrt_0(__m128 x);
00075 extern void am_rsqrt_0(const float* in, float* out, size_t N);
00076 extern float am_rsqrt_1(float x);
00077 extern __m128 am_rsqrt_1(__m128 x);
00078 extern void am_rsqrt_1(const float* in, float* out, size_t N);
00079 extern float am_rsqrt_2(float x);
00081 
00082 
00084 extern float am_exp(float x);
00085 extern __m128 am_exp(__m128 x);
00086 extern void am_exp(const float* in, float* out, size_t N);
00087 
00089 extern float am_log(float x);
00090 extern __m128 am_log(__m128 x);
00091 extern void am_log(const float* in, float* out, size_t N);
00092 
00094 extern float am_pow(float x, float y);
00095 extern __m128 am_pow(__m128 x, __m128 y);
00096 
00097 
00099 
00100 
00101 extern float am_sin(float x);
00102 extern __m128 am_sin(__m128 x);
00103 extern void am_sin(const float* in, float* out, size_t N);
00104 
00106 extern float am_cos(float x);
00107 extern __m128 am_cos(__m128 x);
00108 extern void am_cos(const float* in, float* out, size_t N);
00109 
00111 extern void am_sincos(float x, float& s, float& c);
00112 extern void am_sincos(__m128 x, __m128& s, __m128& c);
00113 
00115 extern float am_tan(float x);
00116 extern __m128 am_tan(__m128 x);
00117 extern void am_tan(const float* in, float* out, size_t N);
00118 
00120 extern float am_asin(float x);
00121 extern __m128 am_asin(__m128 x);
00122 extern void am_asin(const float* in, float* out, size_t N);
00123 
00125 extern float am_acos(float x);
00126 extern __m128 am_acos(__m128 x);
00127 extern void am_acos(const float* in, float* out, size_t N);
00128 
00130 extern float am_atan(float x);
00131 extern __m128 am_atan(__m128 x);
00132 extern void am_atan(const float* in, float* out, size_t N);
00134 
00135 };
00136 };
00137 };
00138 
00139 #endif  // EXMAT_ENABLE_SSE
00140 
00141 #endif  // _EXMAT_SIMD_SSE_AM_MATH_H

Generated on Sat May 6 23:11:54 2006 for Exmat by  doxygen 1.4.6-NO