HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VM_SSEFunc.h File Reference
#include "VM_API.h"
#include <SYS/SYS_Inline.h>
#include <SYS/SYS_Types.h>
#include <emmintrin.h>
+ Include dependency graph for VM_SSEFunc.h:

Go to the source code of this file.

Macros

#define CPU_HAS_SIMD_INSTR   1
 
#define VM_SSE_STYLE   1
 
#define V4SF(A)   (v4sf)A
 
#define V4SI(A)   (v4si)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_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
 

Typedefs

typedef __m128 v4sf
 
typedef __m128i v4si
 

Macro Definition Documentation

#define CPU_HAS_SIMD_INSTR   1

Definition at line 23 of file VM_SSEFunc.h.

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

Definition at line 369 of file VM_SSEFunc.h.

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

Definition at line 370 of file VM_SSEFunc.h.

#define V4SF (   A)    (v4sf)A

Definition at line 72 of file VM_SSEFunc.h.

#define V4SI (   A)    (v4si)A

Definition at line 73 of file VM_SSEFunc.h.

#define VM_ABS   vm_abs

Definition at line 343 of file VM_SSEFunc.h.

#define VM_ADD   _mm_add_ps

Definition at line 336 of file VM_SSEFunc.h.

#define VM_ALLBITS   vm_allbits

Definition at line 358 of file VM_SSEFunc.h.

#define VM_AND   _mm_and_si128

Definition at line 353 of file VM_SSEFunc.h.

#define VM_ANDNOT   _mm_andnot_si128

Definition at line 354 of file VM_SSEFunc.h.

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

Definition at line 326 of file VM_SSEFunc.h.

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

Definition at line 325 of file VM_SSEFunc.h.

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

Definition at line 324 of file VM_SSEFunc.h.

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

Definition at line 323 of file VM_SSEFunc.h.

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

Definition at line 322 of file VM_SSEFunc.h.

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

Definition at line 327 of file VM_SSEFunc.h.

#define VM_DIV   _mm_div_ps

Definition at line 339 of file VM_SSEFunc.h.

#define VM_E_FLOOR ( )    SETROUND(rounding);

Definition at line 379 of file VM_SSEFunc.h.

#define VM_EXTRACT   vm_extract

Definition at line 316 of file VM_SSEFunc.h.

#define VM_FDIV   vm_fdiv

Definition at line 345 of file VM_SSEFunc.h.

#define VM_FLOOR   _mm_cvtps_epi32

Definition at line 377 of file VM_SSEFunc.h.

#define VM_FSQRT   vm_fsqrt

Definition at line 347 of file VM_SSEFunc.h.

#define VM_IADD   _mm_add_epi32

Definition at line 333 of file VM_SSEFunc.h.

#define VM_ICMPEQ   _mm_cmpeq_epi32

Definition at line 331 of file VM_SSEFunc.h.

#define VM_ICMPGT   _mm_cmpgt_epi32

Definition at line 330 of file VM_SSEFunc.h.

#define VM_ICMPLT   _mm_cmplt_epi32

Definition at line 329 of file VM_SSEFunc.h.

#define VM_IFLOAT   _mm_cvtepi32_ps

Definition at line 382 of file VM_SSEFunc.h.

#define VM_INSERT   vm_insert

Definition at line 317 of file VM_SSEFunc.h.

#define VM_INT   _mm_cvttps_epi32

Definition at line 378 of file VM_SSEFunc.h.

#define VM_INVERT   _mm_rcp_ps

Definition at line 342 of file VM_SSEFunc.h.

#define VM_ISQRT   _mm_rsqrt_ps

Definition at line 341 of file VM_SSEFunc.h.

#define VM_ISUB   _mm_sub_epi32

Definition at line 334 of file VM_SSEFunc.h.

#define VM_LOAD   vm_load

Definition at line 319 of file VM_SSEFunc.h.

#define VM_MADD   vm_madd

Definition at line 348 of file VM_SSEFunc.h.

#define VM_MAX   _mm_max_ps

Definition at line 351 of file VM_SSEFunc.h.

#define VM_MIN   _mm_min_ps

Definition at line 350 of file VM_SSEFunc.h.

#define VM_MUL   _mm_mul_ps

Definition at line 338 of file VM_SSEFunc.h.

#define VM_NEG   vm_negate

Definition at line 346 of file VM_SSEFunc.h.

#define VM_OR   _mm_or_si128

Definition at line 355 of file VM_SSEFunc.h.

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

Definition at line 375 of file VM_SSEFunc.h.

#define VM_SHUFFLE   vm_shuffle

Definition at line 360 of file VM_SSEFunc.h.

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

Definition at line 77 of file VM_SSEFunc.h.

#define VM_SPLATS   vm_splats

Definition at line 318 of file VM_SSEFunc.h.

#define VM_SQRT   _mm_sqrt_ps

Definition at line 340 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_DOWN   0x2000

Definition at line 366 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_MASK   0x6000

Definition at line 363 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_NEAR   0x0000

Definition at line 367 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_UP   0x4000

Definition at line 365 of file VM_SSEFunc.h.

#define VM_SSE_ROUND_ZERO   0x6000

Definition at line 364 of file VM_SSEFunc.h.

#define VM_SSE_STYLE   1

Definition at line 24 of file VM_SSEFunc.h.

#define VM_STORE   vm_store

Definition at line 320 of file VM_SSEFunc.h.

#define VM_SUB   _mm_sub_ps

Definition at line 337 of file VM_SSEFunc.h.

#define VM_XOR   _mm_xor_si128

Definition at line 356 of file VM_SSEFunc.h.

Typedef Documentation

typedef __m128 v4sf

Definition at line 27 of file VM_SSEFunc.h.

typedef __m128i v4si

Definition at line 28 of file VM_SSEFunc.h.