SASC-NG
DVBSoftCAM

parallel_128_16char.h File Reference

Go to the source code of this file.

Classes

struct  group_t
struct  batch_t

Defines

#define GROUP_PARALLELISM   128
#define BYTES_PER_BATCH   16

Typedefs

typedef struct group_t group
typedef struct batch_t batch

Functions

static group FF0 ()
static group FF1 ()
static group FFAND (group a, group b)
static group FFOR (group a, group b)
static group FFXOR (group a, group b)
static group FFNOT (group a)
static void FFTABLEIN (unsigned char *tab, int g, unsigned char *data)
static void FFTABLEOUT (unsigned char *data, unsigned char *tab, int g)
static void FFTABLEOUTXORNBY (int n, unsigned char *data, unsigned char *tab, int g)
static batch B_FFAND (batch a, batch b)
static batch B_FFOR (batch a, batch b)
static batch B_FFXOR (batch a, batch b)
static batch B_FFN_ALL_29 ()
static batch B_FFN_ALL_02 ()
static batch B_FFN_ALL_04 ()
static batch B_FFN_ALL_10 ()
static batch B_FFN_ALL_40 ()
static batch B_FFN_ALL_80 ()
static batch B_FFSH8L (batch a, int n)
static batch B_FFSH8R (batch a, int n)
static void M_EMPTY (void)

Define Documentation

#define BYTES_PER_BATCH   16

Definition at line 180 of file parallel_128_16char.h.

#define GROUP_PARALLELISM   128

Definition at line 26 of file parallel_128_16char.h.


Typedef Documentation

typedef struct batch_t batch

Definition at line 178 of file parallel_128_16char.h.

typedef struct group_t group

Definition at line 24 of file parallel_128_16char.h.


Function Documentation

static batch B_FFAND ( batch  a,
batch  b 
) [inline, static]

Definition at line 182 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                            {
  batch res;
  res.s1=a.s1&b.s1;
  res.s2=a.s2&b.s2;
  res.s3=a.s3&b.s3;
  res.s4=a.s4&b.s4;
  res.s5=a.s5&b.s5;
  res.s6=a.s6&b.s6;
  res.s7=a.s7&b.s7;
  res.s8=a.s8&b.s8;
  res.s9=a.s9&b.s9;
  res.s10=a.s10&b.s10;
  res.s11=a.s11&b.s11;
  res.s12=a.s12&b.s12;
  res.s13=a.s13&b.s13;
  res.s14=a.s14&b.s14;
  res.s15=a.s15&b.s15;
  res.s16=a.s16&b.s16;
  return res;
}
static batch B_FFN_ALL_02 ( ) [inline, static]

Definition at line 266 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x02;
  res.s2=0x02;
  res.s3=0x02;
  res.s4=0x02;
  res.s5=0x02;
  res.s6=0x02;
  res.s7=0x02;
  res.s8=0x02;
  res.s9=0x02;
  res.s10=0x02;
  res.s11=0x02;
  res.s12=0x02;
  res.s13=0x02;
  res.s14=0x02;
  res.s15=0x02;
  res.s16=0x02;
  return res;
}
static batch B_FFN_ALL_04 ( ) [inline, static]

Definition at line 286 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x04;
  res.s2=0x04;
  res.s3=0x04;
  res.s4=0x04;
  res.s5=0x04;
  res.s6=0x04;
  res.s7=0x04;
  res.s8=0x04;
  res.s9=0x04;
  res.s10=0x04;
  res.s11=0x04;
  res.s12=0x04;
  res.s13=0x04;
  res.s14=0x04;
  res.s15=0x04;
  res.s16=0x04;
  return res;
}
static batch B_FFN_ALL_10 ( ) [inline, static]

Definition at line 306 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x10;
  res.s2=0x10;
  res.s3=0x10;
  res.s4=0x10;
  res.s5=0x10;
  res.s6=0x10;
  res.s7=0x10;
  res.s8=0x10;
  res.s9=0x10;
  res.s10=0x10;
  res.s11=0x10;
  res.s12=0x10;
  res.s13=0x10;
  res.s14=0x10;
  res.s15=0x10;
  res.s16=0x10;
  return res;
}
static batch B_FFN_ALL_29 ( ) [inline, static]

Definition at line 246 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x29;
  res.s2=0x29;
  res.s3=0x29;
  res.s4=0x29;
  res.s5=0x29;
  res.s6=0x29;
  res.s7=0x29;
  res.s8=0x29;
  res.s9=0x29;
  res.s10=0x29;
  res.s11=0x29;
  res.s12=0x29;
  res.s13=0x29;
  res.s14=0x29;
  res.s15=0x29;
  res.s16=0x29;
  return res;
}
static batch B_FFN_ALL_40 ( ) [inline, static]

Definition at line 326 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x40;
  res.s2=0x40;
  res.s3=0x40;
  res.s4=0x40;
  res.s5=0x40;
  res.s6=0x40;
  res.s7=0x40;
  res.s8=0x40;
  res.s9=0x40;
  res.s10=0x40;
  res.s11=0x40;
  res.s12=0x40;
  res.s13=0x40;
  res.s14=0x40;
  res.s15=0x40;
  res.s16=0x40;
  return res;
}
static batch B_FFN_ALL_80 ( ) [inline, static]

Definition at line 346 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                  {
  batch res;
  res.s1=0x80;
  res.s2=0x80;
  res.s3=0x80;
  res.s4=0x80;
  res.s5=0x80;
  res.s6=0x80;
  res.s7=0x80;
  res.s8=0x80;
  res.s9=0x80;
  res.s10=0x80;
  res.s11=0x80;
  res.s12=0x80;
  res.s13=0x80;
  res.s14=0x80;
  res.s15=0x80;
  res.s16=0x80;
  return res;
}
static batch B_FFOR ( batch  a,
batch  b 
) [inline, static]

Definition at line 203 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                           {
  batch res;
  res.s1=a.s1|b.s1;
  res.s2=a.s2|b.s2;
  res.s3=a.s3|b.s3;
  res.s4=a.s4|b.s4;
  res.s5=a.s5|b.s5;
  res.s6=a.s6|b.s6;
  res.s7=a.s7|b.s7;
  res.s8=a.s8|b.s8;
  res.s9=a.s9|b.s9;
  res.s10=a.s10|b.s10;
  res.s11=a.s11|b.s11;
  res.s12=a.s12|b.s12;
  res.s13=a.s13|b.s13;
  res.s14=a.s14|b.s14;
  res.s15=a.s15|b.s15;
  res.s16=a.s16|b.s16;
  return res;
}
static batch B_FFSH8L ( batch  a,
int  n 
) [inline, static]

Definition at line 367 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                           {
  batch res;
  res.s1=a.s1<<n;
  res.s2=a.s2<<n;
  res.s3=a.s3<<n;
  res.s4=a.s4<<n;
  res.s5=a.s5<<n;
  res.s6=a.s6<<n;
  res.s7=a.s7<<n;
  res.s8=a.s8<<n;
  res.s9=a.s9<<n;
  res.s10=a.s10<<n;
  res.s11=a.s11<<n;
  res.s12=a.s12<<n;
  res.s13=a.s13<<n;
  res.s14=a.s14<<n;
  res.s15=a.s15<<n;
  res.s16=a.s16<<n;
  return res;
}
static batch B_FFSH8R ( batch  a,
int  n 
) [inline, static]

Definition at line 388 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                           {
  batch res;
  res.s1=a.s1>>n;
  res.s2=a.s2>>n;
  res.s3=a.s3>>n;
  res.s4=a.s4>>n;
  res.s5=a.s5>>n;
  res.s6=a.s6>>n;
  res.s7=a.s7>>n;
  res.s8=a.s8>>n;
  res.s9=a.s9>>n;
  res.s10=a.s10>>n;
  res.s11=a.s11>>n;
  res.s12=a.s12>>n;
  res.s13=a.s13>>n;
  res.s14=a.s14>>n;
  res.s15=a.s15>>n;
  res.s16=a.s16>>n;
  return res;
}
static batch B_FFXOR ( batch  a,
batch  b 
) [inline, static]

Definition at line 224 of file parallel_128_16char.h.

References batch_t::s1, batch_t::s10, batch_t::s11, batch_t::s12, batch_t::s13, batch_t::s14, batch_t::s15, batch_t::s16, batch_t::s2, batch_t::s3, batch_t::s4, batch_t::s5, batch_t::s6, batch_t::s7, batch_t::s8, and batch_t::s9.

                                            {
  batch res;
  res.s1=a.s1^b.s1;
  res.s2=a.s2^b.s2;
  res.s3=a.s3^b.s3;
  res.s4=a.s4^b.s4;
  res.s5=a.s5^b.s5;
  res.s6=a.s6^b.s6;
  res.s7=a.s7^b.s7;
  res.s8=a.s8^b.s8;
  res.s9=a.s9^b.s9;
  res.s10=a.s10^b.s10;
  res.s11=a.s11^b.s11;
  res.s12=a.s12^b.s12;
  res.s13=a.s13^b.s13;
  res.s14=a.s14^b.s14;
  res.s15=a.s15^b.s15;
  res.s16=a.s16^b.s16;
  return res;
}
static group FF0 ( ) [inline, static]

Definition at line 28 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                         {
  group res;
  res.s1=0x0;
  res.s2=0x0;
  res.s3=0x0;
  res.s4=0x0;
  res.s5=0x0;
  res.s6=0x0;
  res.s7=0x0;
  res.s8=0x0;
  res.s9=0x0;
  res.s10=0x0;
  res.s11=0x0;
  res.s12=0x0;
  res.s13=0x0;
  res.s14=0x0;
  res.s15=0x0;
  res.s16=0x0;
  return res;
}
static group FF1 ( ) [inline, static]

Definition at line 49 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                         {
  group res;
  res.s1=0xff;
  res.s2=0xff;
  res.s3=0xff;
  res.s4=0xff;
  res.s5=0xff;
  res.s6=0xff;
  res.s7=0xff;
  res.s8=0xff;
  res.s9=0xff;
  res.s10=0xff;
  res.s11=0xff;
  res.s12=0xff;
  res.s13=0xff;
  res.s14=0xff;
  res.s15=0xff;
  res.s16=0xff;
  return res;
}
static group FFAND ( group  a,
group  b 
) [inline, static]

Definition at line 70 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                                          {
  group res;
  res.s1=a.s1&b.s1;
  res.s2=a.s2&b.s2;
  res.s3=a.s3&b.s3;
  res.s4=a.s4&b.s4;
  res.s5=a.s5&b.s5;
  res.s6=a.s6&b.s6;
  res.s7=a.s7&b.s7;
  res.s8=a.s8&b.s8;
  res.s9=a.s9&b.s9;
  res.s10=a.s10&b.s10;
  res.s11=a.s11&b.s11;
  res.s12=a.s12&b.s12;
  res.s13=a.s13&b.s13;
  res.s14=a.s14&b.s14;
  res.s15=a.s15&b.s15;
  res.s16=a.s16&b.s16;
  return res;
}
static group FFNOT ( group  a) [inline, static]

Definition at line 133 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                                  {
  group res;
  res.s1=~a.s1;
  res.s2=~a.s2;
  res.s3=~a.s3;
  res.s4=~a.s4;
  res.s5=~a.s5;
  res.s6=~a.s6;
  res.s7=~a.s7;
  res.s8=~a.s8;
  res.s9=~a.s9;
  res.s10=~a.s10;
  res.s11=~a.s11;
  res.s12=~a.s12;
  res.s13=~a.s13;
  res.s14=~a.s14;
  res.s15=~a.s15;
  res.s16=~a.s16;
  return res;
}
static group FFOR ( group  a,
group  b 
) [inline, static]

Definition at line 91 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                                         {
  group res;
  res.s1=a.s1|b.s1;
  res.s2=a.s2|b.s2;
  res.s3=a.s3|b.s3;
  res.s4=a.s4|b.s4;
  res.s5=a.s5|b.s5;
  res.s6=a.s6|b.s6;
  res.s7=a.s7|b.s7;
  res.s8=a.s8|b.s8;
  res.s9=a.s9|b.s9;
  res.s10=a.s10|b.s10;
  res.s11=a.s11|b.s11;
  res.s12=a.s12|b.s12;
  res.s13=a.s13|b.s13;
  res.s14=a.s14|b.s14;
  res.s15=a.s15|b.s15;
  res.s16=a.s16|b.s16;
  return res;
}
static void FFTABLEIN ( unsigned char *  tab,
int  g,
unsigned char *  data 
) [inline, static]

Definition at line 157 of file parallel_128_16char.h.

References data.

                                                                            {
  *(((int *)tab)+2*g)=*((int *)data);
  *(((int *)tab)+2*g+1)=*(((int *)data)+1);
}
static void FFTABLEOUT ( unsigned char *  data,
unsigned char *  tab,
int  g 
) [inline, static]

Definition at line 162 of file parallel_128_16char.h.

                                                                             {
  *((int *)data)=*(((int *)tab)+2*g);
  *(((int *)data)+1)=*(((int *)tab)+2*g+1);
}
static void FFTABLEOUTXORNBY ( int  n,
unsigned char *  data,
unsigned char *  tab,
int  g 
) [inline, static]

Definition at line 167 of file parallel_128_16char.h.

References j.

                                                                                          {
  int j;
  for(j=0;j<n;j++){
    *(data+j)^=*(tab+8*g+j);
  }
}
static group FFXOR ( group  a,
group  b 
) [inline, static]

Definition at line 112 of file parallel_128_16char.h.

References group_t::s1, group_t::s10, group_t::s11, group_t::s12, group_t::s13, group_t::s14, group_t::s15, group_t::s16, group_t::s2, group_t::s3, group_t::s4, group_t::s5, group_t::s6, group_t::s7, group_t::s8, and group_t::s9.

                                          {
  group res;
  res.s1=a.s1^b.s1;
  res.s2=a.s2^b.s2;
  res.s3=a.s3^b.s3;
  res.s4=a.s4^b.s4;
  res.s5=a.s5^b.s5;
  res.s6=a.s6^b.s6;
  res.s7=a.s7^b.s7;
  res.s8=a.s8^b.s8;
  res.s9=a.s9^b.s9;
  res.s10=a.s10^b.s10;
  res.s11=a.s11^b.s11;
  res.s12=a.s12^b.s12;
  res.s13=a.s13^b.s13;
  res.s14=a.s14^b.s14;
  res.s15=a.s15^b.s15;
  res.s16=a.s16^b.s16;
  return res;
}
static void M_EMPTY ( void  ) [inline, static]

Definition at line 410 of file parallel_128_16char.h.

                                {
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines