1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2016 Jeremy Mason
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

//! The purpose of this crate is to relegate the functions generated by the
//! `encode!`, `decode!`, `encode_simd!`, `decode_simd!` and `encode_util!`
//! syntax extensions of `mayda_macros` to a separate compilation unit. More
//! extensive documentation is provided in the `mayda_macros` crate.

#![feature(plugin)]
#![plugin(mayda_macros)]

#![allow(unused_mut)]

extern crate simd;

macro_rules! codec {
  ($(($width: expr, $step: expr, $simd: path))*) => ($(
    encode!($width, $step);
    decode!($width, $step);
    encode_simd!($width, $simd);
    decode_simd!($width, $simd);
    encode_util!($width, $simd);
  )*)
}

codec!{
  (8, 8, simd)
  (16, 8, simd)
  (32, 8, simd)
  (64, 8, simd::x86::sse2)
}