Changeset 183 for trunk/lib/lib_simd.h


Ignore:
Timestamp:
Jul 10, 2008, 6:17:58 PM (11 years ago)
Author:
cameron
Message:

SIMD templated library - restructuring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/lib_simd.h

    r179 r183  
    4949#endif
    5050#if BYTE_ORDER == LITTLE_ENDIAN
     51#ifdef TEMPLATED_SIMD_LIB
     52static inline SIMD_type sisd_sfl(SIMD_type blk, SIMD_type n) {
     53        return simd<128>::sll(blk, n);
     54}
     55
     56static inline SIMD_type sisd_sbl(SIMD_type blk, SIMD_type n) {
     57        return simd<128>::srl(blk, n);
     58}
     59#define sisd_sfli(blk, n) simd<128>::slli<n>(blk)
     60#define sisd_sbli(blk, n) simd<128>::srli<n>(blk)
     61#endif
     62#ifndef TEMPLATED_SIMD_LIB
    5163static inline SIMD_type sisd_sfl(SIMD_type blk, SIMD_type n) {
    5264        return sisd_sll(blk, n);
    5365}
    54 //#define sisd_sbl(blk, n) sisd_srl(blk, n)
     66static inline SIMD_type sisd_sbl(SIMD_type blk, SIMD_type n) {
     67        return sisd_srl(blk, n);
     68}
    5569#define sisd_sfli(blk, n) sisd_slli(blk, n)
    5670#define sisd_sbli(blk, n) sisd_srli(blk, n)
     71#endif
    5772#define sb_op(x, n) ((x)>>(n))
    5873#define sf_op(x, n) ((x)<<(n))
Note: See TracChangeset for help on using the changeset viewer.