OpenJPH
Open-source implementation of JPEG2000 Part-15
Loading...
Searching...
No Matches
ojph_simd_vsx.h File Reference
#include <altivec.h>
#include <cstring>
#include "ojph_defs.h"

Go to the source code of this file.

Macros

#define vsx_v128_store32_lane(p, a, i)
#define vsx_u8x16_extract_lane(a, i)
#define vsx_u16x8_extract_lane(a, i)
#define vsx_i32x4_extract_lane(a, i)
#define vsx_u32x4_extract_lane(a, i)
#define vsx_i64x2_extract_lane(a, i)
#define vsx_i8x16_shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15)
#define vsx_i16x8_shuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7)
#define vsx_i32x4_shuffle(a, b, c0, c1, c2, c3)
#define vsx_i64x2_shuffle(a, b, c0, c1)

Functions

static v128_t vsx_v128_load (const void *p)
static void vsx_v128_store (void *p, v128_t a)
static v128_t vsx_i8x16_const (signed char c0, signed char c1, signed char c2, signed char c3, signed char c4, signed char c5, signed char c6, signed char c7, signed char c8, signed char c9, signed char c10, signed char c11, signed char c12, signed char c13, signed char c14, signed char c15)
static v128_t vsx_i16x8_const (short c0, short c1, short c2, short c3, short c4, short c5, short c6, short c7)
static v128_t vsx_u16x8_const (unsigned short c0, unsigned short c1, unsigned short c2, unsigned short c3, unsigned short c4, unsigned short c5, unsigned short c6, unsigned short c7)
static v128_t vsx_i32x4_const (int c0, int c1, int c2, int c3)
static v128_t vsx_u32x4_const (unsigned int c0, unsigned int c1, unsigned int c2, unsigned int c3)
static v128_t vsx_i64x2_const (long long c0, long long c1)
static v128_t vsx_u64x2_const (unsigned long long c0, unsigned long long c1)
static v128_t vsx_i8x16_splat (signed char x)
static v128_t vsx_i16x8_splat (short x)
static v128_t vsx_i32x4_splat (int x)
static v128_t vsx_u32x4_splat (unsigned int x)
static v128_t vsx_i64x2_splat (long long x)
static v128_t vsx_f32x4_splat (float x)
static v128_t vsx_i32x4_make (int a, int b, int c, int d)
static v128_t vsx_v128_and (v128_t a, v128_t b)
static v128_t vsx_v128_or (v128_t a, v128_t b)
static v128_t vsx_v128_xor (v128_t a, v128_t b)
static v128_t vsx_v128_andnot (v128_t a, v128_t b)
static v128_t vsx_i8x16_add (v128_t a, v128_t b)
static v128_t vsx_i16x8_add (v128_t a, v128_t b)
static v128_t vsx_i32x4_add (v128_t a, v128_t b)
static v128_t vsx_i64x2_add (v128_t a, v128_t b)
static v128_t vsx_i16x8_sub (v128_t a, v128_t b)
static v128_t vsx_i32x4_sub (v128_t a, v128_t b)
static v128_t vsx_i64x2_sub (v128_t a, v128_t b)
static v128_t vsx_i16x8_mul (v128_t a, v128_t b)
static v128_t vsx_i32x4_mul (v128_t a, v128_t b)
static v128_t vsx_i64x2_mul (v128_t a, v128_t b)
static v128_t vsx_i8x16_abs (v128_t a)
static v128_t vsx_u8x16_min (v128_t a, v128_t b)
static v128_t vsx_i16x8_max (v128_t a, v128_t b)
static v128_t vsx_i16x8_shl (v128_t a, int n)
static v128_t vsx_i32x4_shl (v128_t a, int n)
static v128_t vsx_i64x2_shl (v128_t a, int n)
static v128_t vsx_i32x4_shr (v128_t a, int n)
static v128_t vsx_i64x2_shr (v128_t a, int n)
static v128_t vsx_u16x8_shr (v128_t a, int n)
static v128_t vsx_u32x4_shr (v128_t a, int n)
static v128_t vsx_u64x2_shr (v128_t a, int n)
static v128_t vsx_i8x16_eq (v128_t a, v128_t b)
static v128_t vsx_i16x8_eq (v128_t a, v128_t b)
static v128_t vsx_i32x4_eq (v128_t a, v128_t b)
static v128_t vsx_i8x16_gt (v128_t a, v128_t b)
static v128_t vsx_i32x4_gt (v128_t a, v128_t b)
static v128_t vsx_i32x4_lt (v128_t a, v128_t b)
static v128_t vsx_i64x2_lt (v128_t a, v128_t b)
static v128_t vsx_f32x4_ge (v128_t a, v128_t b)
static v128_t vsx_f32x4_lt (v128_t a, v128_t b)
static v128_t vsx_f32x4_add (v128_t a, v128_t b)
static v128_t vsx_f32x4_sub (v128_t a, v128_t b)
static v128_t vsx_f32x4_mul (v128_t a, v128_t b)
static v128_t vsx_i32x4_trunc_sat_f32x4 (v128_t a)
static v128_t vsx_f32x4_convert_i32x4 (v128_t a)
static v128_t vsx_i64x2_extend_low_i32x4 (v128_t a)
static v128_t vsx_i64x2_extend_high_i32x4 (v128_t a)
static v128_t vsx_i8x16_swizzle (v128_t a, v128_t idx)
static int vsx_i8x16_bitmask (v128_t a)

Macro Definition Documentation

◆ vsx_i16x8_shuffle

#define vsx_i16x8_shuffle ( a,
b,
c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7 )
Value:
((v128_t)vec_perm((vsx_v_u8)(a), (vsx_v_u8)(b), (vsx_v_u8){ \
(c0)*2, (c0)*2+1, (c1)*2, (c1)*2+1, \
(c2)*2, (c2)*2+1, (c3)*2, (c3)*2+1, \
(c4)*2, (c4)*2+1, (c5)*2, (c5)*2+1, \
(c6)*2, (c6)*2+1, (c7)*2, (c7)*2+1 \
}))
__vector unsigned char v128_t
__vector unsigned char vsx_v_u8

Definition at line 307 of file ojph_simd_vsx.h.

◆ vsx_i32x4_extract_lane

#define vsx_i32x4_extract_lane ( a,
i )
Value:
(((vsx_v_i32)(a))[(i)])
__vector signed int vsx_v_i32

Definition at line 142 of file ojph_simd_vsx.h.

◆ vsx_i32x4_shuffle

#define vsx_i32x4_shuffle ( a,
b,
c0,
c1,
c2,
c3 )
Value:
((v128_t)vec_perm((vsx_v_u8)(a), (vsx_v_u8)(b), (vsx_v_u8){ \
(c0)*4, (c0)*4+1, (c0)*4+2, (c0)*4+3, \
(c1)*4, (c1)*4+1, (c1)*4+2, (c1)*4+3, \
(c2)*4, (c2)*4+1, (c2)*4+2, (c2)*4+3, \
(c3)*4, (c3)*4+1, (c3)*4+2, (c3)*4+3 \
}))

Definition at line 316 of file ojph_simd_vsx.h.

◆ vsx_i64x2_extract_lane

#define vsx_i64x2_extract_lane ( a,
i )
Value:
(((vsx_v_i64)(a))[(i)])
__vector signed long long vsx_v_i64

Definition at line 144 of file ojph_simd_vsx.h.

◆ vsx_i64x2_shuffle

#define vsx_i64x2_shuffle ( a,
b,
c0,
c1 )
Value:
((v128_t)vec_perm((vsx_v_u8)(a), (vsx_v_u8)(b), (vsx_v_u8){ \
(c0)*8, (c0)*8+1, (c0)*8+2, (c0)*8+3, \
(c0)*8+4, (c0)*8+5, (c0)*8+6, (c0)*8+7, \
(c1)*8, (c1)*8+1, (c1)*8+2, (c1)*8+3, \
(c1)*8+4, (c1)*8+5, (c1)*8+6, (c1)*8+7 \
}))

Definition at line 325 of file ojph_simd_vsx.h.

◆ vsx_i8x16_shuffle

#define vsx_i8x16_shuffle ( a,
b,
c0,
c1,
c2,
c3,
c4,
c5,
c6,
c7,
c8,
c9,
c10,
c11,
c12,
c13,
c14,
c15 )
Value:
((v128_t)vec_perm((vsx_v_u8)(a), (vsx_v_u8)(b), (vsx_v_u8){ \
(c0), (c1), (c2), (c3), (c4), (c5), (c6), (c7), \
(c8), (c9), (c10),(c11),(c12),(c13),(c14),(c15) \
}))

Definition at line 299 of file ojph_simd_vsx.h.

◆ vsx_u16x8_extract_lane

#define vsx_u16x8_extract_lane ( a,
i )
Value:
(((vsx_v_u16)(a))[(i)])
__vector unsigned short vsx_v_u16

Definition at line 141 of file ojph_simd_vsx.h.

◆ vsx_u32x4_extract_lane

#define vsx_u32x4_extract_lane ( a,
i )
Value:
(((vsx_v_u32)(a))[(i)])
__vector unsigned int vsx_v_u32

Definition at line 143 of file ojph_simd_vsx.h.

◆ vsx_u8x16_extract_lane

#define vsx_u8x16_extract_lane ( a,
i )
Value:
(((vsx_v_u8)(a))[(i)])

Definition at line 140 of file ojph_simd_vsx.h.

◆ vsx_v128_store32_lane

#define vsx_v128_store32_lane ( p,
a,
i )
Value:
do { vsx_v_i32 t_ = (vsx_v_i32)(a); int v_ = t_[(i)]; \
std::memcpy((p), &v_, 4); } while (0)

Definition at line 85 of file ojph_simd_vsx.h.

Function Documentation

◆ vsx_f32x4_add()

v128_t vsx_f32x4_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 246 of file ojph_simd_vsx.h.

◆ vsx_f32x4_convert_i32x4()

v128_t vsx_f32x4_convert_i32x4 ( v128_t a)
inlinestatic

Definition at line 257 of file ojph_simd_vsx.h.

◆ vsx_f32x4_ge()

v128_t vsx_f32x4_ge ( v128_t a,
v128_t b )
inlinestatic

Definition at line 238 of file ojph_simd_vsx.h.

◆ vsx_f32x4_lt()

v128_t vsx_f32x4_lt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 240 of file ojph_simd_vsx.h.

◆ vsx_f32x4_mul()

v128_t vsx_f32x4_mul ( v128_t a,
v128_t b )
inlinestatic

Definition at line 250 of file ojph_simd_vsx.h.

◆ vsx_f32x4_splat()

v128_t vsx_f32x4_splat ( float x)
inlinestatic

Definition at line 131 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_f32x4_sub()

v128_t vsx_f32x4_sub ( v128_t a,
v128_t b )
inlinestatic

Definition at line 248 of file ojph_simd_vsx.h.

◆ vsx_i16x8_add()

v128_t vsx_i16x8_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 164 of file ojph_simd_vsx.h.

◆ vsx_i16x8_const()

v128_t vsx_i16x8_const ( short c0,
short c1,
short c2,
short c3,
short c4,
short c5,
short c6,
short c7 )
inlinestatic

Definition at line 101 of file ojph_simd_vsx.h.

◆ vsx_i16x8_eq()

v128_t vsx_i16x8_eq ( v128_t a,
v128_t b )
inlinestatic

Definition at line 224 of file ojph_simd_vsx.h.

◆ vsx_i16x8_max()

v128_t vsx_i16x8_max ( v128_t a,
v128_t b )
inlinestatic

Definition at line 191 of file ojph_simd_vsx.h.

◆ vsx_i16x8_mul()

v128_t vsx_i16x8_mul ( v128_t a,
v128_t b )
inlinestatic

Definition at line 180 of file ojph_simd_vsx.h.

◆ vsx_i16x8_shl()

v128_t vsx_i16x8_shl ( v128_t a,
int n )
inlinestatic

Definition at line 197 of file ojph_simd_vsx.h.

◆ vsx_i16x8_splat()

v128_t vsx_i16x8_splat ( short x)
inlinestatic

Definition at line 123 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_i16x8_sub()

v128_t vsx_i16x8_sub ( v128_t a,
v128_t b )
inlinestatic

Definition at line 171 of file ojph_simd_vsx.h.

◆ vsx_i32x4_add()

v128_t vsx_i32x4_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 166 of file ojph_simd_vsx.h.

◆ vsx_i32x4_const()

v128_t vsx_i32x4_const ( int c0,
int c1,
int c2,
int c3 )
inlinestatic

Definition at line 110 of file ojph_simd_vsx.h.

◆ vsx_i32x4_eq()

v128_t vsx_i32x4_eq ( v128_t a,
v128_t b )
inlinestatic

Definition at line 226 of file ojph_simd_vsx.h.

◆ vsx_i32x4_gt()

v128_t vsx_i32x4_gt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 231 of file ojph_simd_vsx.h.

◆ vsx_i32x4_lt()

v128_t vsx_i32x4_lt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 233 of file ojph_simd_vsx.h.

◆ vsx_i32x4_make()

v128_t vsx_i32x4_make ( int a,
int b,
int c,
int d )
inlinestatic

Definition at line 134 of file ojph_simd_vsx.h.

◆ vsx_i32x4_mul()

v128_t vsx_i32x4_mul ( v128_t a,
v128_t b )
inlinestatic

Definition at line 182 of file ojph_simd_vsx.h.

◆ vsx_i32x4_shl()

v128_t vsx_i32x4_shl ( v128_t a,
int n )
inlinestatic

Definition at line 199 of file ojph_simd_vsx.h.

◆ vsx_i32x4_shr()

v128_t vsx_i32x4_shr ( v128_t a,
int n )
inlinestatic

Definition at line 205 of file ojph_simd_vsx.h.

◆ vsx_i32x4_splat()

v128_t vsx_i32x4_splat ( int x)
inlinestatic

Definition at line 125 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_i32x4_sub()

v128_t vsx_i32x4_sub ( v128_t a,
v128_t b )
inlinestatic

Definition at line 173 of file ojph_simd_vsx.h.

◆ vsx_i32x4_trunc_sat_f32x4()

v128_t vsx_i32x4_trunc_sat_f32x4 ( v128_t a)
inlinestatic

Definition at line 255 of file ojph_simd_vsx.h.

◆ vsx_i64x2_add()

v128_t vsx_i64x2_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 168 of file ojph_simd_vsx.h.

◆ vsx_i64x2_const()

v128_t vsx_i64x2_const ( long long c0,
long long c1 )
inlinestatic

Definition at line 115 of file ojph_simd_vsx.h.

◆ vsx_i64x2_extend_high_i32x4()

v128_t vsx_i64x2_extend_high_i32x4 ( v128_t a)
inlinestatic

Definition at line 272 of file ojph_simd_vsx.h.

◆ vsx_i64x2_extend_low_i32x4()

v128_t vsx_i64x2_extend_low_i32x4 ( v128_t a)
inlinestatic

Definition at line 263 of file ojph_simd_vsx.h.

◆ vsx_i64x2_lt()

v128_t vsx_i64x2_lt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 235 of file ojph_simd_vsx.h.

◆ vsx_i64x2_mul()

v128_t vsx_i64x2_mul ( v128_t a,
v128_t b )
inlinestatic

Definition at line 184 of file ojph_simd_vsx.h.

◆ vsx_i64x2_shl()

v128_t vsx_i64x2_shl ( v128_t a,
int n )
inlinestatic

Definition at line 201 of file ojph_simd_vsx.h.

◆ vsx_i64x2_shr()

v128_t vsx_i64x2_shr ( v128_t a,
int n )
inlinestatic

Definition at line 207 of file ojph_simd_vsx.h.

◆ vsx_i64x2_splat()

v128_t vsx_i64x2_splat ( long long x)
inlinestatic

Definition at line 129 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_i64x2_sub()

v128_t vsx_i64x2_sub ( v128_t a,
v128_t b )
inlinestatic

Definition at line 175 of file ojph_simd_vsx.h.

◆ vsx_i8x16_abs()

v128_t vsx_i8x16_abs ( v128_t a)
inlinestatic

Definition at line 187 of file ojph_simd_vsx.h.

◆ vsx_i8x16_add()

v128_t vsx_i8x16_add ( v128_t a,
v128_t b )
inlinestatic

Definition at line 162 of file ojph_simd_vsx.h.

◆ vsx_i8x16_bitmask()

int vsx_i8x16_bitmask ( v128_t a)
inlinestatic

Definition at line 349 of file ojph_simd_vsx.h.

◆ vsx_i8x16_const()

v128_t vsx_i8x16_const ( signed char c0,
signed char c1,
signed char c2,
signed char c3,
signed char c4,
signed char c5,
signed char c6,
signed char c7,
signed char c8,
signed char c9,
signed char c10,
signed char c11,
signed char c12,
signed char c13,
signed char c14,
signed char c15 )
inlinestatic

Definition at line 94 of file ojph_simd_vsx.h.

◆ vsx_i8x16_eq()

v128_t vsx_i8x16_eq ( v128_t a,
v128_t b )
inlinestatic

Definition at line 222 of file ojph_simd_vsx.h.

◆ vsx_i8x16_gt()

v128_t vsx_i8x16_gt ( v128_t a,
v128_t b )
inlinestatic

Definition at line 229 of file ojph_simd_vsx.h.

◆ vsx_i8x16_splat()

v128_t vsx_i8x16_splat ( signed char x)
inlinestatic

Definition at line 121 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_i8x16_swizzle()

v128_t vsx_i8x16_swizzle ( v128_t a,
v128_t idx )
inlinestatic

Definition at line 336 of file ojph_simd_vsx.h.

◆ vsx_u16x8_const()

v128_t vsx_u16x8_const ( unsigned short c0,
unsigned short c1,
unsigned short c2,
unsigned short c3,
unsigned short c4,
unsigned short c5,
unsigned short c6,
unsigned short c7 )
inlinestatic

Definition at line 105 of file ojph_simd_vsx.h.

◆ vsx_u16x8_shr()

v128_t vsx_u16x8_shr ( v128_t a,
int n )
inlinestatic

Definition at line 211 of file ojph_simd_vsx.h.

◆ vsx_u32x4_const()

v128_t vsx_u32x4_const ( unsigned int c0,
unsigned int c1,
unsigned int c2,
unsigned int c3 )
inlinestatic

Definition at line 112 of file ojph_simd_vsx.h.

◆ vsx_u32x4_shr()

v128_t vsx_u32x4_shr ( v128_t a,
int n )
inlinestatic

Definition at line 213 of file ojph_simd_vsx.h.

◆ vsx_u32x4_splat()

v128_t vsx_u32x4_splat ( unsigned int x)
inlinestatic

Definition at line 127 of file ojph_simd_vsx.h.

References ojph_unused.

◆ vsx_u64x2_const()

v128_t vsx_u64x2_const ( unsigned long long c0,
unsigned long long c1 )
inlinestatic

Definition at line 117 of file ojph_simd_vsx.h.

◆ vsx_u64x2_shr()

v128_t vsx_u64x2_shr ( v128_t a,
int n )
inlinestatic

Definition at line 215 of file ojph_simd_vsx.h.

◆ vsx_u8x16_min()

v128_t vsx_u8x16_min ( v128_t a,
v128_t b )
inlinestatic

Definition at line 189 of file ojph_simd_vsx.h.

◆ vsx_v128_and()

v128_t vsx_v128_and ( v128_t a,
v128_t b )
inlinestatic

Definition at line 149 of file ojph_simd_vsx.h.

◆ vsx_v128_andnot()

v128_t vsx_v128_andnot ( v128_t a,
v128_t b )
inlinestatic

Definition at line 156 of file ojph_simd_vsx.h.

◆ vsx_v128_load()

v128_t vsx_v128_load ( const void * p)
inlinestatic

Definition at line 79 of file ojph_simd_vsx.h.

◆ vsx_v128_or()

v128_t vsx_v128_or ( v128_t a,
v128_t b )
inlinestatic

Definition at line 151 of file ojph_simd_vsx.h.

◆ vsx_v128_store()

void vsx_v128_store ( void * p,
v128_t a )
inlinestatic

Definition at line 82 of file ojph_simd_vsx.h.

◆ vsx_v128_xor()

v128_t vsx_v128_xor ( v128_t a,
v128_t b )
inlinestatic

Definition at line 153 of file ojph_simd_vsx.h.