head	1.7;
access;
symbols
	bobbase:1.7
	bob:1.7
	r2_1:1.7
	r2_0:1.7
	r1_1_beta:1.7
	r1_1_alpha:1.7
	r1_0:1.7
	r0_11:1.7
	r0_10:1.5
	r0_9:1.4;
locks; strict;
comment	@# @;


1.7
date	94.02.24.18.25.47;	author thoth;	state Exp;
branches;
next	1.6;

1.6
date	94.02.12.19.36.51;	author thoth;	state Exp;
branches;
next	1.5;

1.5
date	94.01.07.15.24.53;	author thoth;	state Exp;
branches;
next	1.4;

1.4
date	93.11.17.18.41.07;	author thoth;	state Exp;
branches;
next	1.3;

1.3
date	93.09.27.15.54.56;	author thoth;	state Exp;
branches;
next	1.2;

1.2
date	93.09.21.11.44.32;	author thoth;	state Exp;
branches;
next	1.1;

1.1
date	93.09.15.13.04.31;	author thoth;	state Exp;
branches;
next	;


desc
@description of int DT convolutions.
@


1.7
log
@You can now convolve IntDDTemplates.
@
text
@#
#	Copyright 1993, Center for Computer Vision and Visualization,
#	University of Florida.  All rights reserved.
#

#
# $Log: int-convolutions.desc,v $
# Revision 1.6  1994/02/12  19:36:51  thoth
# Rehack of template operation specifications.
#
# Revision 1.5  1994/01/07  15:24:53  thoth
# Template reductions had wrong ring zeros.
#
# Revision 1.4  1993/11/17  18:41:07  thoth
# forward convolutions are now supported.
# template reductions are now supported.
#
# Revision 1.3  1993/09/27  15:54:56  thoth
# Make the xxxmax_product and xxxmin_product functions a little more robust.
#
# Revision 1.2  93/09/21  11:44:32  thoth
# remove cruft that belongs in double-convolutions.desc
# 
# Revision 1.1  93/09/15  13:04:31  thoth
# Initial revision
# 
# Revision 1.3  93/05/27  11:41:13  thoth
# Copyright Notices
# 
# Revision 1.2  93/05/18  21:44:57  thoth
# New more descriptive names for standard convolutions.
# 
# Revision 1.1  93/03/18  11:23:20  thoth
# Initial revision
# 

convolution linear_product T(int) T(int) T(int)
end

convolution linear_product zero=0 I(int) I(int) T(int)
init:	RTYPE	a = ZERO;
accum:	a += IVAL * TVAL;
final:	IRESULT = a;
end

convolution linear_product zero=0 I(int) T(int) I(int)
init:	RTYPE	a = ZERO;
accum:	a += IVAL * TVAL;
final:	IRESULT = a;
accvar:	IRESULT += IVAL * TVAL;
end

# we have to be careful doing the following transforms
# machine integers are NOT mathematical integers...

convolution addmax_product zero=-MAXINT I(int) I(int) T(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE ival = IVAL; if (ival == ZERO) continue; RTYPE temp = IVAL+TVAL; if (temp > a) a = temp;
final:	IRESULT = a;
end

convolution addmax_product zero=-MAXINT I(int) T(int) I(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE ival = IVAL; if (ival == ZERO) continue; RTYPE temp = IVAL+TVAL; if (temp > a) a = temp;
final:	IRESULT = a;
accvar:	RTYPE temp = IVAL + TVAL; if (temp > IRESULT) IRESULT = temp;
end

#

convolution addmin_product zero=MAXINT I(int) I(int) T(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE ival = IVAL; if (ival == ZERO) continue; RTYPE temp = ival+TVAL; if (temp < a) a = temp;
accvar:	RTYPE temp = IVAL+TVAL; if (temp < a) a = temp;
final:	IRESULT = a;
end

convolution addmin_product zero=MAXINT I(int) T(int) I(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE ival = IVAL; if (ival == ZERO) continue; RTYPE temp = ival+TVAL; if (temp < a) a = temp;
final:	IRESULT = a;
accvar:	RTYPE temp = IVAL + TVAL; if (temp < IRESULT) IRESULT = temp;
end

#

convolution multmax_product zero=-1 I(int) I(int) T(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE	ival = IVAL; if (ival<0) continue; RTYPE temp = ival*TVAL; if (temp>a) a = temp;
accvar:	RTYPE temp = IVAL*TVAL; if (temp>a) a = temp;
final:	IRESULT = a;
end

convolution multmax_product zero=-1 I(int) T(int) I(int)
init:	RTYPE	a=ZERO;
accum:	register IBTYPE	ival = IVAL; if (ival<0) continue; RTYPE temp = ival*TVAL; if (temp>a) a = temp;
final:	IRESULT = a;
accvar:	RTYPE temp = IVAL * TVAL; if (temp > IRESULT) IRESULT = temp;
end

#

convolution multmin_product zero=-1 I(int) I(int) T(int)
init:	RTYPE	a=MAXINT;
accum:	register IBTYPE	ival = IVAL; if (ival<0) continue; RTYPE temp = ival*TVAL; if (temp<a) a = temp;
accvar:	RTYPE temp = IVAL*TVAL; if (temp<a) a = temp;
final:	IRESULT = a;
end

convolution multmin_product zero=-1 I(int) T(int) I(int)
init:	RTYPE	a=MAXINT;
accum:	register IBTYPE	ival = IVAL; if (ival<0) continue; RTYPE temp = ival*TVAL; if (temp<a) a = temp;
final:	IRESULT = a;
accvar:	if (IVAL ==ZERO) continue; RTYPE temp = IVAL * TVAL; if (temp < IRESULT) IRESULT = temp;
end

#
#

reduction sum zero=0 I(int) T(int)
accum:	IRESULT += TVAL;
end

reduction max zero=-MAXINT I(int) T(int)
accum:	if (TVAL>IRESULT) IRESULT = TVAL;
end

reduction min zero=MAXINT I(int) T(int)
accum:	if (TVAL<IRESULT) IRESULT = TVAL;
end


binary operator+ zero=0 gamma=sum T(int) T(int) T(int)
binary min zero=MAXINT gamma=min T(int) T(int) T(int)
binary max zero=-MAXINT gamma=max T(int) T(int) T(int)
# convolution linear_product zero=0 gamma=sum circle=product T(int) T(int) T(int)
@


1.6
log
@Rehack of template operation specifications.
@
text
@d8 3
d36 3
@


1.5
log
@Template reductions had wrong ring zeros.
@
text
@d8 3
d34 1
a34 1
convolution int linear_product int int zero=0
a37 2
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT += IVAL * TVAL;
d40 7
d50 1
a50 1
convolution int addmax_product int int zero=-MAXINT
a53 2
forw_init:	IRESULT = ZERO;
forw_accumvar:	RTYPE temp = IVAL + TVAL; if (temp > IRESULT) IRESULT = temp;
d56 1
a56 1
convolution int addmin_product int int  zero=MAXINT
d58 9
a69 2
forw_init:	IRESULT = ZERO;
forw_accumvar:	RTYPE temp = IVAL + TVAL; if (temp < IRESULT) IRESULT = temp;
d72 1
a72 1
convolution int multmax_product int int zero=-1
d74 9
a85 2
forw_init:	IRESULT = ZERO;
forw_accumvar:	RTYPE temp = IVAL * TVAL; if (temp > IRESULT) IRESULT = temp;
d88 10
a97 1
convolution int multmin_product int int zero=-1
a101 2
forw_init:	IRESULT = MAXINT;
forw_accumvar:	if (IVAL ==ZERO) continue; RTYPE temp = IVAL * TVAL; if (temp < IRESULT) IRESULT = temp;
d104 6
d111 2
d114 1
a114 1
reduction int sum int zero=0
d118 1
a118 1
reduction int max int zero=-MAXINT
d122 1
a122 1
reduction int min int zero=MAXINT
d125 6
@


1.4
log
@forward convolutions are now supported.
template reductions are now supported.
@
text
@d8 4
d83 1
a83 1
reduction int max int zero=MAXINT
d87 1
a87 1
reduction int min int zero=-MAXINT
@


1.3
log
@Make the xxxmax_product and xxxmin_product functions a little more robust.
@
text
@d7 4
a10 1
# $Log:	int-convolutions.desc,v $
d27 1
a27 1
int linear_product int int zero=0
d31 3
d38 1
a38 1
int addmax_product int int zero=-MAXINT
d40 1
a40 1
accum:	register IBTYPE ival = IVAL; if (ival ==-MAXINT) continue; RTYPE temp = IVAL+TVAL; if (temp > a) a = temp;
d42 3
d46 1
a46 1
int addmin_product int int  zero=MAXINT
d48 1
a48 1
accum:	register IBTYPE ival = IVAL; if (ival == MAXINT) continue; RTYPE temp = ival+TVAL; if (temp < a) a = temp;
d51 3
d55 1
a55 1
int multmax_product int int zero=-1
d60 3
d64 1
a64 1
int multmin_product int int zero=-1
d69 17
@


1.2
log
@remove cruft that belongs in double-convolutions.desc
@
text
@d8 3
d25 1
a25 1
init:	RTYPE	a = 0;
d29 3
d33 2
a34 2
init:	RTYPE	a=-MAXINT;
accum:	RTYPE temp = IVAL+TVAL; if (temp > a) a = temp;
d38 1
a38 1
init:	RTYPE	a=MAXINT;
d41 12
@


1.1
log
@Initial revision
@
text
@d8 3
a30 6
# double addmax double double zero=-MAXDOUBLE
# init:	RTYPE	a=-MAXDOUBLE;
# accum:	RTYPE temp = IVAL+TVAL; if (temp > a) a = temp;
# final:	IRESULT = a;
#

a35 6

# double addmin double double
# init:	RTYPE	a=MAXDOUBLE;
# accum:	RTYPE temp = IVAL+TVAL; if (temp < a) a = temp;
# final:	IRESULT = a;
#
@
