Intrinsics.h

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 
00023 #ifndef _EXMAT_SIMD_SSE_INTRINSICS_H
00024 #define _EXMAT_SIMD_SSE_INTRINSICS_H
00025 
00026 
00027 #include <xmmintrin.h>
00028 #include "../../PlatformSpec.h"
00029 
00030 namespace exmat {
00031 namespace SIMD {
00032 namespace Intrinsics {
00033 
00034 EXMAT_INLINE2 static __m128 load1_p(const float* a) {
00035     return _mm_load1_ps((float*)(a));
00036 }
00037 
00038 EXMAT_INLINE2 static __m128 add_p(__m128 a, __m128 b) {
00039     return _mm_add_ps(a, b);
00040 }
00041 
00042 EXMAT_INLINE2 static __m128 sub_p(__m128 a, __m128 b) {
00043     return _mm_sub_ps(a, b);
00044 }
00045 
00046 EXMAT_INLINE2 static __m128 mul_p(__m128 a, __m128 b) {
00047     return _mm_mul_ps(a, b);
00048 }
00049 
00050 EXMAT_INLINE2 static __m128 div_p(__m128 a, __m128 b) {
00051     return _mm_div_ps(a, b);
00052 }
00053 
00054 };
00055 };
00056 };
00057 
00058 
00059 #endif  // _EXMAT_SIMD_SSE_INTRINSICS_H

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