HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VM_SSEFunc.h File Reference
#include "VM_API.h"
#include <SYS/SYS_Align.h>
#include <SYS/SYS_Inline.h>
#include <SYS/SYS_Types.h>
#include <emmintrin.h>
+ Include dependency graph for VM_SSEFunc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CPU_HAS_SIMD_INSTR   1
 
#define VM_SSE_STYLE   1
 
#define V4SF(A)   _mm_castsi128_ps(A)
 
#define V4SI(A)   _mm_castps_si128(A)
 
#define VM_SHUFFLE_MASK(a0, a1, b0, b1)   ((b1)<<6|(b0)<<4 | (a1)<<2|(a0))
 
#define VM_EXTRACT   vm_extract
 
#define VM_INSERT   vm_insert
 
#define VM_SPLATS   vm_splats
 
#define VM_LOAD   vm_load
 
#define VM_STORE   vm_store
 
#define VM_CMPLT(A, B)   V4SI(_mm_cmplt_ps(A,B))
 
#define VM_CMPLE(A, B)   V4SI(_mm_cmple_ps(A,B))
 
#define VM_CMPGT(A, B)   V4SI(_mm_cmpgt_ps(A,B))
 
#define VM_CMPGE(A, B)   V4SI(_mm_cmpge_ps(A,B))
 
#define VM_CMPEQ(A, B)   V4SI(_mm_cmpeq_ps(A,B))
 
#define VM_CMPNE(A, B)   V4SI(_mm_cmpneq_ps(A,B))
 
#define VM_ICMPLT   _mm_cmplt_epi32
 
#define VM_ICMPGT   _mm_cmpgt_epi32
 
#define VM_ICMPEQ   _mm_cmpeq_epi32
 
#define VM_IADD   _mm_add_epi32
 
#define VM_ISUB   _mm_sub_epi32
 
#define VM_ADD   _mm_add_ps
 
#define VM_SUB   _mm_sub_ps
 
#define VM_MUL   _mm_mul_ps
 
#define VM_DIV   _mm_div_ps
 
#define VM_SQRT   _mm_sqrt_ps
 
#define VM_ISQRT   _mm_rsqrt_ps
 
#define VM_INVERT   _mm_rcp_ps
 
#define VM_ABS   vm_abs
 
#define VM_FDIV   vm_fdiv
 
#define VM_NEG   vm_negate
 
#define VM_FSQRT   vm_fsqrt
 
#define VM_MADD   vm_madd
 
#define VM_MIN   _mm_min_ps
 
#define VM_MAX   _mm_max_ps
 
#define VM_AND   _mm_and_si128
 
#define VM_ANDNOT   _mm_andnot_si128
 
#define VM_OR   _mm_or_si128
 
#define VM_XOR   _mm_xor_si128
 
#define VM_ALLBITS   vm_allbits
 
#define VM_SIGNBITS   vm_signbits
 
#define VM_SHUFFLE   vm_shuffle
 
#define VM_SSE_ROUND_MASK   0x6000
 
#define VM_SSE_ROUND_ZERO   0x6000
 
#define VM_SSE_ROUND_UP   0x4000
 
#define VM_SSE_ROUND_DOWN   0x2000
 
#define VM_SSE_ROUND_NEAR   0x0000
 
#define GETROUND()   (_mm_getcsr()&VM_SSE_ROUND_MASK)
 
#define SETROUND(x)   (_mm_setcsr(x|(_mm_getcsr()&~VM_SSE_ROUND_MASK)))
 
#define VM_P_FLOOR()
 
#define VM_FLOOR   _mm_cvtps_epi32
 
#define VM_INT   _mm_cvttps_epi32
 
#define VM_E_FLOOR()   SETROUND(rounding);
 
#define VM_IFLOAT   _mm_cvtepi32_ps
 
#define VM_SHIFTLEFT(A, C)   _mm_sll_epi32(A,_mm_setr_epi32(C,0,0,0))
 
#define VM_SHIFTRIGHT(A, C)   _mm_srl_epi32(A,_mm_setr_epi32(C,0,0,0))
 
#define _PS_CONST(Name, Val)   static const SYS_ALIGN16 float _ps_##Name[4] = { Val, Val, Val, Val }
 
#define _PI32_CONST(Name, Val)   static const SYS_ALIGN16 int _pi32_##Name[4] = { Val, Val, Val, Val }
 
#define _PS_CONST_TYPE(Name, Type, Val)   static const SYS_ALIGN16 Type _ps_##Name[4] = { Val, Val, Val, Val }
 
#define VM_SINCOS   vm_sincos
 
#define VM_SIN   vm_sin
 
#define VM_COS   vm_cos
 
#define VM_TAN   vm_tan
 

Typedefs

typedef __m128 v4sf
 
typedef __m128i v4si
 

Macro Definition Documentation

#define _PI32_CONST (   Name,
  Val 
)    static const SYS_ALIGN16 int _pi32_##Name[4] = { Val, Val, Val, Val }
#define _PS_CONST (   Name,
  Val 
)    static const SYS_ALIGN16 float _ps_##Name[4] = { Val, Val, Val, Val }
#define _PS_CONST_TYPE (   Name,
  Type,
  Val 
)    static const SYS_ALIGN16 Type _ps_##Name[4] = { Val, Val, Val, Val }
#define CPU_HAS_SIMD_INSTR   1

Definition at line 24 of file VM_SSEFunc.h.

#define GETROUND ( )    (_mm_getcsr()&VM_SSE_ROUND_MASK)

Definition at line 366 of file VM_SSEFunc.h.

#define SETROUND (   x)    (_mm_setcsr(x|(_mm_getcsr()&~VM_SSE_ROUND_MASK)))

Definition at line 367 of file VM_SSEFunc.h.

#define V4SF (   A)    _mm_castsi128_ps(A)

Definition at line 49 of file VM_SSEFunc.h.

#define V4SI (   A)    _mm_castps_si128(A)

Definition at line 50 of file VM_SSEFunc.h.

#define VM_ABS   vm_abs

Definition at line 338 of file VM_SSEFunc.h.

#define VM_ADD   _mm_add_ps

Definition at line 331 of file VM_SSEFunc.h.

#define VM_ALLBITS   vm_allbits

Definition at line 353 of file VM_SSEFunc.h.

#define VM_AND   _mm_and_si128

Definition at line 348 of file VM_SSEFunc.h.

#define VM_ANDNOT   _mm_andnot_si128

Definition at line 349 of file VM_SSEFunc.h.

#define VM_CMPEQ (   A,
 
)    V4SI(_mm_cmpeq_ps(A,B))

Definition at line 318 of file VM_SSEFunc.h.

#define VM_CMPGE (   A,
 
)    V4SI(_mm_cmpge_ps(A,B))

Definition at line 317 of file VM_SSEFunc.h.

#define VM_CMPGT (   A,
 
)    V4SI(_mm_cmpgt_ps(A,B))

Definition at line 316 of file VM_SSEFunc.h.

#define VM_CMPLE (   A,
 
)    V4SI(_mm_cmple_ps(A,B))

Definition at line 315 of file VM_SSEFunc.h.

#define VM_CMPLT (   A,
 
)    V4SI(_mm_cmplt_ps(A,B))

Definition at line 314 of file VM_SSEFunc.h.

#define VM_CMPNE (   A,
 
)    V4SI(_mm_cmpneq_ps(A,B))

Definition at line 319 of file VM_SSEFunc.h.

#define VM_COS   vm_cos

Definition at line 565 of file VM_SSEFunc.h.

#define VM_DIV   _mm_div_ps

Definition at line 334 of file VM_SSEFunc.h.

#define VM_E_FLOOR ( )    SETROUND(rounding);

Definition at line 385 of file VM_SSEFunc.h.

#define VM_EXTRACT   vm_extract

Definition at line 308 of file VM_SSEFunc.h.

#define VM_FDIV   vm_fdiv

Definition at line 340 of file VM_SSEFunc.h.

#define VM_FLOOR   _mm_cvtps_epi32

Definition at line 383 of file VM_SSEFunc.h.

#define VM_FSQRT   vm_fsqrt

Definition at line 342 of file VM_SSEFunc.h.

#define VM_IADD   _mm_add_epi32

Definition at line 325 of file VM_SSEFunc.h.

#define VM_ICMPEQ   _mm_cmpeq_epi32

Definition at line 323 of file VM_SSEFunc.h.

#define VM_ICMPGT   _mm_cmpgt_epi32

Definition at line 322 of file VM_SSEFunc.h.

#define VM_ICMPLT   _mm_cmplt_epi32

Definition at line 321 of file VM_SSEFunc.h.

#define VM_IFLOAT   _mm_cvtepi32_ps

Definition at line 388 of file VM_SSEFunc.h.

#define VM_INSERT   vm_insert

Definition at line 309 of file VM_SSEFunc.h.

#define VM_INT   _mm_cvttps_epi32

Definition at line 384 of file VM_SSEFunc.h.

#define VM_INVERT   _mm_rcp_ps

Definition at line 337 of file VM_SSEFunc.h.

#define VM_ISQRT   _mm_rsqrt_ps

Definition at line 336 of file VM_SSEFunc.h.

#define VM_ISUB   _mm_sub_epi32

Definition at line 326 of file VM_SSEFunc.h.

#define VM_LOAD   vm_load

Definition at line 311 of file VM_SSEFunc.h.

#define VM_MADD   vm_madd

Definition at line 343 of file VM_SSEFunc.h.

#define VM_MAX   _mm_max_ps

Definition at line 346 of file VM_SSEFunc.h.

#define VM_MIN   _mm_min_ps

Definition at line 345 of file VM_SSEFunc.h.

#define VM_MUL   _mm_mul_ps

Definition at line 333 of file VM_SSEFunc.h.

#define VM_NEG   vm_negate

Definition at line 341 of file VM_SSEFunc.h.

#define VM_OR   _mm_or_si128

Definition at line 350 of file VM_SSEFunc.h.

#define VM_P_FLOOR ( )
Value:
uint rounding = GETROUND(); \
#define VM_SSE_ROUND_DOWN
Definition: VM_SSEFunc.h:363
#define GETROUND()
Definition: VM_SSEFunc.h:366
#define SETROUND(x)
Definition: VM_SSEFunc.h:367
unsigned int uint
Definition: SYS_Types.h:45

Definition at line 381 of file VM_SSEFunc.h.

#define VM_SHIFTLEFT (   A,
 
)    _mm_sll_epi32(A,_mm_setr_epi32(C,0,0,0))

Definition at line 391 of file VM_SSEFunc.h.

#define VM_SHIFTRIGHT (   A,
 
)    _mm_srl_epi32(A,_mm_setr_epi32(C,0,0,0))

Definition at line 392 of file VM_SSEFunc.h.

#define VM_SHUFFLE   vm_shuffle

Definition at line 356 of file VM_SSEFunc.h.

#define VM_SHUFFLE_MASK (   a0,
  a1,
  b0,
  b1 
)    ((b1)<<6|(b0)<<4 | (a1)<<2|(a0))

Definition at line 52 of file VM_SSEFunc.h.

#define VM_SIGNBITS   vm_signbits

Definition at line 354 of file VM_SSEFunc.h.

#define VM_SIN   vm_sin

Definition at line 564 of file VM_SSEFunc.h.

#define VM_SINCOS   vm_sincos

Definition at line 563 of file VM_SSEFunc.h.

#define VM_SPLATS   vm_splats

Definition at line 310 of file VM_SSEFunc.h.

#define VM_SQRT   _mm_sqrt_ps

Definition at line 335 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_DOWN   0x2000

Definition at line 363 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_MASK   0x6000

Definition at line 360 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_NEAR   0x0000

Definition at line 364 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_UP   0x4000

Definition at line 362 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_ZERO   0x6000

Definition at line 361 of file VM_SSEFunc.h.

#define VM_SSE_STYLE   1

Definition at line 25 of file VM_SSEFunc.h.

#define VM_STORE   vm_store

Definition at line 312 of file VM_SSEFunc.h.

#define VM_SUB   _mm_sub_ps

Definition at line 332 of file VM_SSEFunc.h.

#define VM_TAN   vm_tan

Definition at line 566 of file VM_SSEFunc.h.

#define VM_XOR   _mm_xor_si128

Definition at line 351 of file VM_SSEFunc.h.

Typedef Documentation

typedef __m128 v4sf

Definition at line 33 of file VM_SSEFunc.h.

typedef __m128i v4si

Definition at line 34 of file VM_SSEFunc.h.