source: proto/xmlschema/symtab/library_conversion.h @ 3547

Last change on this file since 3547 was 3547, checked in by shiyangy, 5 years ago

symtab file fixed

File size: 887 bytes
Line 
1#ifndef LIBRARY_CONVERSION_H
2#define LIBRARY_CONVERSION_H
3
4#define USE_SSE2
5#include <stdio.h>
6#define SIMD_type BitBlock
7
8#define sisd_load_aligned(x) bitblock::load_aligned((SIMD_type*)x)
9#define simd_mask_eq_8(v1, v2, hex_mask) ((hsimd<8>::signmask(simd<8>::eq(v1, v2)) & hex_mask) == hex_mask)
10#define sisd_load_unaligned(x) bitblock::load_unaligned(x)
11#define simd_all_true(r) hsimd<8>::signmask(r) == 0xFFFF
12#define simd_all_eq_8(v1, v2) simd_all_true(simd<8>::eq(v1, v2))
13
14/* Prints the SIMD register representation of a SIMD value. */
15static void print_simd_register(const char * var_name, SIMD_type v) {
16  union {SIMD_type vec; unsigned char elems[sizeof(SIMD_type)];} x;
17  x.vec = v;
18  unsigned char c;
19  printf("%30s = ", var_name);
20  for(int i=sizeof(SIMD_type)-1; i>=0; i--) {
21    c = x.elems[i];
22    printf("%02X ", c);
23  }
24  printf("\n");
25}
26#endif // LIBRARY_CONVERSION_H
Note: See TracBrowser for help on using the repository browser.