intrinsic_common.hpp

00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2009-05-11
00005 // Updated : 2009-05-11
00006 // Licence : This source is under MIT License
00007 // File    : glm/core/intrinsic_common.hpp
00009 
00010 #ifndef glm_detail_intrinsic_common
00011 #define glm_detail_intrinsic_common
00012 
00013 #include "setup.hpp"
00014 
00015 #if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
00016 #       error "SSE2 instructions not supported or enabled"
00017 #else
00018 
00019 namespace glm{
00020 namespace detail
00021 {
00022         __m128 sse_abs_ps(__m128 x);
00023 
00024         __m128 sse_sgn_ps(__m128 x);
00025 
00026         //floor
00027         __m128 sse_flr_ps(__m128 v);
00028 
00029         //trunc
00030         __m128 sse_trc_ps(__m128 v);
00031 
00032         //round
00033         __m128 sse_nd_ps(__m128 v);
00034 
00035         //roundEven
00036         __m128 sse_rde_ps(__m128 v);
00037 
00038         __m128 sse_rnd_ps(__m128 x);
00039 
00040         __m128 sse_ceil_ps(__m128 v);
00041 
00042         __m128 sse_frc_ps(__m128 x);
00043 
00044         __m128 sse_mod_ps(__m128 x, __m128 y);
00045 
00046         __m128 sse_modf_ps(__m128 x, __m128i & i);
00047 
00048         //inline __m128 sse_min_ps(__m128 x, __m128 y)
00049 
00050         //inline __m128 sse_max_ps(__m128 x, __m128 y)
00051 
00052         __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);
00053 
00054         __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a);
00055 
00056         __m128 sse_stp_ps(__m128 edge, __m128 x);
00057 
00058         __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x);
00059 
00060         __m128 sse_nan_ps(__m128 x);
00061 
00062         __m128 sse_inf_ps(__m128 x);
00063 
00064 }//namespace detail
00065 }//namespace glm
00066 
00067 #include "intrinsic_common.inl"
00068 
00069 #endif//GLM_ARCH
00070 #endif//glm_detail_intrinsic_common