summaryrefslogtreecommitdiff
path: root/interfaces/int_OpExt.h
blob: 7f11ede28b09e643061a994b4017307675f9c133 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET
 * Copyright (C) 2009-2010 - DIGITEO - Bruno JOFRET
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */

/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */

#ifndef __INT_OPEXT_H__
#define __INT_OPEXT_H__

#define s2s0OpExts0(in1,size,in2)		in1[((int)in2)-1];
#define d2d0OpExtd0(in1,size,in2)		in1[((int)in2)-1];
#define c2s0OpExtc0(in1,size,in2)		in1[((int)in2)-1];
#define z2d0OpExtz0(in1,size,in2)		in1[((int)in2)-1];

#define s3s0OpExts0(in1,size,in2)       in1[((int)in2)-1];
#define d3d0OpExtd0(in1,size,in2)       in1[((int)in2)-1];

#define s2s0s0OpExts0(in1,size,row,col)		in1[(((int) col)-1)*size[0]+((int) row)-1];
#define d2d0d0OpExtd0(in1,size,row,col)		in1[(((int) col)-1)*size[0]+((int) row)-1];
#define c2s0s0OpExtc0(in1,size,row,col)		in1[(((int) col)-1)*size[0]+((int) row)-1];
#define z2d0d0OpExtz0(in1,size,row,col)		in1[(((int) col)-1)*size[0]+((int) row)-1];


#define s2s2OpExts2(in1,size1,in2,size2,out)	{int i;			\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];	\
  }

#define d2d2OpExtd2(in1,size1,in2,size2,out)	{int i;			\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];	\
  }

#define c2s2OpExtc2(in1,size1,in2,size2,out)	{int i;			\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];	\
  }

#define z2d2OpExtz2(in1,size1,in2,size2,out)	{int i;			\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=in1[(int)in2[i]-1];	\
  }


#define s2s2s0OpExts2(in1,size1,rows,size2,col,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,(int)rows[i],((int) col));	\
  }

#define d2d2d0OpExtd2(in1,size1,rows,size2,col,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,(int)rows[i],((int) col));	\
  }

#define c2s2s0OpExtc2(in1,size1,rows,size2,col,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,(int)rows[i],((int) col));	\
  }

#define z2d2d0OpExtz2(in1,size1,rows,size2,col,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,(int)rows[i],((int) col));	\
  }

#define s2s0s2OpExts2(in1,size1,row,cols,size2,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=s2s0s0OpExts0(in1,size1,((int) row),(int)cols[i]);	\
  }

#define d2d0d2OpExtd2(in1,size1,row,cols,size2,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=d2d0d0OpExtd0(in1,size1,((int) row),(int)cols[i]);	\
  }

#define c2s0s2OpExtc2(in1,size1,row,cols,size2,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=c2s0s0OpExtc0(in1,size1,((int) row),(int)cols[i]);	\
  }

#define z2d0d2OpExtz2(in1,size1,row,cols,size2,out)	{int i;		\
    for (i=0;i<size2[0]*size2[1];i++) out[i]=z2d0d0OpExtz0(in1,size1,((int) row),(int)cols[i]);	\
  }


#define s2s2s2OpExts2(in1,size1,rows,size2,cols,size3,out)	{int i,j; \
    for (i=0;i<size2[0]*size2[1];i++)					\
      for (j=0;j<size3[0]*size3[1];j++)					\
	out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];	\
  }

#define d2d2d2OpExtd2(in1,size1,rows,size2,cols,size3,out)	{int i,j; \
    for (i=0;i<size2[0]*size2[1];i++)					\
      for (j=0;j<size3[0]*size3[1];j++)					\
	out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];	\
  }

#define c2s2s2OpExtc2(in1,size1,rows,size2,cols,size3,out)	{int i,j; \
    for (i=0;i<size2[0]*size2[1];i++)					\
      for (j=0;j<size3[0]*size3[1];j++)					\
	out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];	\
  }

#define z2d2d2OpExtz2(in1,size1,rows,size2,cols,size3,out)	{int i,j; \
    for (i=0;i<size2[0]*size2[1];i++)					\
      for (j=0;j<size3[0]*size3[1];j++)					\
	out[i+j*size2[0]*size2[1]] = in1[((int)(cols[j])-1)*size1[0]+(int)(rows[i])-1];	\
  }

#define d3d0d0d0OpExtd0(in, size, row, col, level) in[(int) ((row - 1)+ (col -1) * size[0] + (level - 1) * size[0] * size[1])];

#endif /* !__INT_OPEXT_H__ */