include/logical/SSEPlus_logical_REF.h

Go to the documentation of this file.
00001 //
00002 // Copyright (c) 2006-2008 Advanced Micro Devices, Inc. All Rights Reserved.
00003 // This software is subject to the Apache v2.0 License.
00004 //
00005 #ifndef __SSEPLUS_LOGICAL_REF_H__
00006 #define __SSEPLUS_LOGICAL_REF_H__
00007 
00008 #include "../SSEPlus_base.h"
00009 
00010 
00015 SSP_FORCEINLINE __m128i ssp_logical_invert_si128_REF( __m128i a )
00016 {
00017     ssp_m128 A;
00018     A.i = a;
00019 
00020     A.u32[0] = ~A.u32[0];
00021     A.u32[1] = ~A.u32[1];
00022     A.u32[2] = ~A.u32[2];
00023     A.u32[3] = ~A.u32[3];
00024     return A.i;
00025 }
00026 
00027 
00031 SSP_FORCEINLINE __m128i ssp_slli_epi8_REF(__m128i a, const int b)
00032 {
00033     int n;
00034     ssp_m128 A;
00035     A.i = a;
00036     for( n = 0; n < 16; n++ )
00037     {
00038         A.u8[n] = A.u8[n] << b;
00039     }
00040     return A.i;
00041 }
00042 
00046 SSP_FORCEINLINE __m128i ssp_srli_epi8_REF(__m128i a, const int b)
00047 {                                            //  a = VfVeVdVcVbVaV9V8V7V6V5V4V3V2V1V0
00048     int n;
00049     ssp_m128 A;
00050     A.i = a;
00051     for( n = 0; n < 16; n++ )
00052     {
00053         A.u8[n] = A.u8[n] >> b;
00054     }
00055     return A.i;
00056 }
00057 
00063 #endif // __SSEPLUS_LOGICAL_REF_H__

Generated on Wed May 21 13:44:11 2008 for "SSEPlus" by  doxygen 1.5.4