prefix
#
#	Copyright 1993, Center for Computer Vision and Visualization,
#	University of Florida.  All rights reserved.
#

#
# $Log: int-operations.desc,v $
# Revision 1.9.1.2  1995/01/31  16:02:40  thoth
# Need to replace the upward conversions with something...
#
# Revision 1.9.1.1  1994/12/28  17:56:27  thoth
# Conversion to operations table.
# image operations are now friendly with FBI.
# new sgn() function.
#
# Revision 1.9  1994/12/19  19:58:48  ljr
# DOS-inspired name rework.
#
# Revision 1.8  1994/05/17  12:54:56  thoth
# Improved operations generation scheme.  Lines from the op.desc file can
# be quoted into the .c file to allow inclusion of infrastructure.  Also
# the op.desc output can be redirected to several files.  The prefix
# directive allows common information (include files) to be included in
# every generated source file.
#

# Integer operations for the Int Discrete Image

"C#include "IntDI.h"
"C#include "VectorI.h"
"C#include "ConstI.h"
"C#include "ImageIter.h"
"C#include "FBI.h"
"C#include "../valueset/OpTable.h"
end

filename IIO-cvcomplex.c
#conversion I(complex) I(int)
unary pointwise to_complex subop= I(complex) I(int)
filename IIO-cvfloat.c
#conversion I(float) I(int)
unary pointwise to_float subop= I(float) I(int)
filename IIO-to_uchar.c
unary pointwise to_uchar subop=u_char I(u_char) I(int)
filename IIO-to_bit.c
unary pointwise to_bit subop=IA_Bit I(IA_Bit) I(int)


filename IIO-__pl.c
binary pointwise commutative operator+ I(int) I(int) I(int)
binary pointwise commutative operator+ I(int) I(int) int
pointwise operator+= I(int) I(int)
pointwise operator+= I(int) int

filename IIO-__mi.c
binary pointwise non-commutative operator- I(int) I(int) I(int)
binary pointwise non-commutative operator- I(int) I(int) int
binary pointwise non-commutative operator- I(int) int I(int)
unary pointwise operator- I(int) I(int)
pointwise operator-= I(int) I(int)
pointwise operator-= I(int) int

filename IIO-__ml.c
binary pointwise commutative operator* I(int) I(int) I(int)
binary pointwise commutative operator* I(int) I(int) int
pointwise operator*= I(int) I(int)
pointwise operator*= I(int) int

#filename IIO-__mlBit.c
#binary pointwise commutative operator* I(int) I(int) I(IA_Bit)
#binary pointwise commutative operator* I(int) int I(IA_Bit)
#pointwise operator*= I(int) I(IA_Bit)

filename IIO-__dv.c
binary pointwise non-commutative operator/ I(int) I(int) I(int)
binary pointwise non-commutative operator/ I(int) I(int) int
binary pointwise non-commutative operator/ I(int) int I(int)
pointwise operator/= I(int) I(int)
pointwise operator/= I(int) int

"Cinline int pseudo_div(int a, int b)
"C{
"C    return (b==0) ? 0 : (a/b);
"C}

binary pointwise non-commutative pseudo_div I(int) I(int) I(int)
binary pointwise non-commutative pseudo_div I(int) int I(int)

filename IIO-__md.c
binary pointwise non-commutative operator% I(int) I(int) I(int)
binary pointwise non-commutative operator% I(int) I(int) int
binary pointwise non-commutative operator% I(int) int I(int)
pointwise operator%= I(int) I(int)
pointwise operator%= I(int) int


filename IIO-__ad.c
binary pointwise commutative operator& I(int) I(int) I(int)
binary pointwise commutative operator& I(int) I(int) int
pointwise operator&= I(int) I(int)
pointwise operator&= I(int) int

filename IIO-__or.c
binary pointwise commutative operator| I(int) I(int) I(int)
binary pointwise commutative operator| I(int) I(int) int
pointwise operator|= I(int) I(int)
pointwise operator|= I(int) int

filename IIO-__er.c
binary pointwise commutative operator^ I(int) I(int) I(int)
binary pointwise commutative operator^ I(int) I(int) int
pointwise operator^= I(int) I(int)
pointwise operator^= I(int) int

filename IIO-__ls.c
binary pointwise commutative operator<< I(int) I(int) I(int)
binary pointwise commutative operator<< I(int) I(int) int
pointwise operator<<= I(int) I(int)
pointwise operator<<= I(int) int

filename IIO-__rs.c
binary pointwise commutative operator>> I(int) I(int) I(int)
binary pointwise commutative operator>> I(int) I(int) int
pointwise operator>>= I(int) I(int)
pointwise operator>>= I(int) int

filename IIO-__co.c
unary pointwise operator~ I(int) I(int)


filename IIO-__aa.c
binary pointwise commutative operator&& I(int) I(int) I(int)
binary pointwise commutative operator&& I(int) I(int) int

filename IIO-__oo.c
binary pointwise commutative operator|| I(int) I(int) I(int)
binary pointwise commutative operator|| I(int) I(int) int

filename IIO-__nt.c
unary pointwise operator! I(int) I(int)


filename IIO-__lt.c
binary strictrel non-commutative operator< int I(int) I(int)
binary strictrel non-commutative operator< int I(int) int
binary strictrel non-commutative operator< int int I(int)

filename IIO-__le.c
binary strictrel non-commutative operator<= int I(int) I(int)
binary strictrel non-commutative operator<= int I(int) int
binary strictrel non-commutative operator<= int int I(int)

filename IIO-__eq.c
binary strictrel commutative operator== int I(int) I(int)
binary strictrel commutative operator== int I(int) int

filename IIO-strict_ne.c
binary strictrel commutative strict_ne subop=operator!= int I(int) I(int)
binary strictrel commutative strict_ne subop=operator!= int I(int) int

filename IIO-__ge.c
binary strictrel non-commutative operator>= int I(int) I(int)
binary strictrel non-commutative operator>= int I(int) int
binary strictrel non-commutative operator>= int int I(int)

filename IIO-__gt.c
binary strictrel non-commutative operator> int I(int) I(int)
binary strictrel non-commutative operator> int I(int) int
binary strictrel non-commutative operator> int int I(int)

filename IIO-X_lt.c
binary pointwise non-commutative chi_lt subop=operator< I(IA_Bit) I(int) I(int)
binary pointwise non-commutative chi_lt subop=operator< I(IA_Bit) I(int) int
binary pointwise non-commutative chi_lt subop=operator< I(IA_Bit) int I(int)

filename IIO-X_le.c
binary pointwise non-commutative chi_le subop=operator<= I(IA_Bit) I(int) I(int)
binary pointwise non-commutative chi_le subop=operator<= I(IA_Bit) I(int) int
binary pointwise non-commutative chi_le subop=operator<= I(IA_Bit) int I(int)

filename IIO-X_eq.c
binary pointwise commutative chi_eq subop=operator== I(IA_Bit) I(int) I(int)
binary pointwise commutative chi_eq subop=operator== I(IA_Bit) I(int) int

filename IIO-X_ne.c
binary pointwise commutative chi_ne subop=operator!= I(IA_Bit) I(int) I(int)
binary pointwise commutative chi_ne subop=operator!= I(IA_Bit) I(int) int

filename IIO-X_ge.c
binary pointwise non-commutative chi_ge subop=operator>= I(IA_Bit) I(int) I(int)
binary pointwise non-commutative chi_ge subop=operator>= I(IA_Bit) I(int) int
binary pointwise non-commutative chi_ge subop=operator>= I(IA_Bit) int I(int)

filename IIO-X_gt.c
binary pointwise non-commutative chi_gt subop=operator> I(IA_Bit) I(int) I(int)
binary pointwise non-commutative chi_gt subop=operator> I(IA_Bit) I(int) int
binary pointwise non-commutative chi_gt subop=operator> I(IA_Bit) int I(int)


filename IIO-unaries.c

"Cinline int isqrt(int v)
"C{
"C    return (int) (sqrt((double) v));
"C}
unary pointwise isqrt I(int) I(int)

"Ctemplate <class T>
"Cinline T sqr(T v)
"C{
"C    return v*v;
"C}
unary pointwise sqr I(int) I(int)

"Ctemplate <class T>
"Cinline T abs(T v)
"C{
"C    return (v>=0)?(v):(-v);
"C}
unary pointwise abs I(int) I(int)

"Ctemplate <class T>
"Cinline T sgn(T v)
"C{
"C    return (v>0)?1:(v<0)?-1:0;
"C}
unary pointwise sgn I(int) I(int)

filename IIO-minmax.c

"Ctemplate <class T>
"Cinline T max(T a, T b)
"C{
"C    return (a<b)?b:a;
"C}
binary pointwise commutative max I(int) I(int) I(int)
binary pointwise commutative max I(int) I(int) int

"Ctemplate <class T>
"Cinline T min(T a, T b)
"C{
"C    return (a<b)?a:b;
"C}
binary pointwise commutative min I(int) I(int) I(int)
binary pointwise commutative min I(int) I(int) int

filename IIO-reductions.c

"C#include <values.h>

"C#define  const_reduce_int_int_sum
"Cinline int const_reduce_sum(unsigned sz, int arg)
"C{
"C    return sz * arg;
"C}
reduction sum subop=operator+ zero=0 int I(int)
reduction product zero=1 subop=operator* int I(int)

"Ctemplate <class T>
"Cinline T max(T a, T b)
"C{
"C    return (a<b)?b:a;
"C}
"C#define const_reduce_int_int_max
"Cinline int const_reduce_max(unsigned, int arg)
"C{
"C    return arg;
"C}
reduction max zero=-MAXINT int I(int)

"Ctemplate <class T>
"Cinline T min(T a, T b)
"C{
"C    return (a<b)?a:b;
"C}
"C#define const_reduce_int_int_min
"Cinline int const_reduce_min(unsigned, int arg)
"C{
"C    return arg;
"C}
reduction min zero=MAXINT int I(int)
