head	1.3;
access;
symbols
	bobbase:1.3
	bob:1.3
	r2_1:1.3
	r2_0:1.3
	r1_1_beta:1.3
	r1_1_alpha:1.3
	r1_0:1.3
	r0_11:1.2
	r0_10:1.1;
locks; strict;
comment	@# @;


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

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

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


desc
@A description of Neighborhood operations.
@


1.3
log
@Automatic neighborhood reductions require change in spec file.
@
text
@#
#	Copyright 1993, Center for Computer Vision and Visualization,
#	University of Florida.  All rights reserved.
#

#
# $Log: neighborhood-ops.desc,v $
# Revision 1.2  1994/04/15  13:19:55  thoth
# removed neighborhood_ prefix from reductions.
#
# Revision 1.1  1994/01/31  16:50:30  thoth
# Initial revision
#

#
# Things that frob Bit images
#

#"C#define NEED_SPARE
# Not really, one of the other reductions below defines the spare for us.
neighborhood int sum IA_Bit zero=0
#init:	RTYPE	a = ZERO;
accum:	if (IVAL) IRESULT++;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL) IRESULT++;
end
#"C#undef NEED_SPARE

neighborhood IA_Bit max IA_Bit zero=0
#init:	RTYPE	a = ZERO;
accum:	IRESULT |= IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT |= IVAL;
end

neighborhood IA_Bit min IA_Bit zero=1
#init:	RTYPE	a = ZERO;
accum:	IRESULT &= IVAL
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT &= IVAL;
end

#
# Things that frob unsigned char images
#
neighborhood int sum u_char zero=0
#init:	RTYPE	a = ZERO;
accum:	IRESULT += IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT += IVAL;
end

neighborhood u_char max u_char zero=0
#init:	RTYPE	a = ZERO;
accum:	if (IVAL>IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL>IRESULT) IRESULT = IVAL;
end

neighborhood u_char min u_char zero=255
#init:	RTYPE	a = ZERO;
accum:	if (IVAL<IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL<IRESULT) IRESULT = IVAL;
end

#
# Things that frob int images
#
neighborhood int sum int zero=0
#init:	RTYPE	a = ZERO;
accum:	IRESULT += IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT += IVAL;
end

neighborhood int product int zero=1
#init:	RTYPE	a = ZERO;
accum:	IRESULT *= IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT *= IVAL;
end

neighborhood int max int zero=-MAXINT
#init:	RTYPE	a = ZERO;
accum:	if (IVAL>IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL>IRESULT) IRESULT = IVAL;
end

neighborhood int min int zero=MAXINT
#init:	RTYPE	a = ZERO;
accum:	if (IVAL<IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL<IRESULT) IRESULT = IVAL;
end

#
# Things that frob float images
#
neighborhood float sum float zero=0
#init:	RTYPE	a = ZERO;
accum:	IRESULT += IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT += IVAL;
end

neighborhood float product float zero=1
#init:	RTYPE	a = ZERO;
accum:	IRESULT *= IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT *= IVAL;
end

neighborhood float max float zero=-infinity()
#init:	RTYPE	a = ZERO;
accum:	if (IVAL>IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL>IRESULT) IRESULT = IVAL;
end

neighborhood float min float zero=infinity()
#init:	RTYPE	a = ZERO;
accum:	if (IVAL<IRESULT) IRESULT = IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	if (IVAL<IRESULT) IRESULT = IVAL;
end

#
# Things that frob complex images
#
neighborhood complex sum complex zero=0
#init:	RTYPE	a = ZERO;
accum:	IRESULT += IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT += IVAL;
end

neighborhood complex product complex zero=1
#init:	RTYPE	a = ZERO;
accum:	IRESULT *= IVAL;
#final:	IRESULT = a;
forw_init:	IRESULT = ZERO;
forw_accumvar:	IRESULT *= IVAL;
end
@


1.2
log
@removed neighborhood_ prefix from reductions.
@
text
@d8 3
d18 3
d22 3
a24 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL) a++;
final:	IRESULT = a;
d28 1
d31 3
a33 3
init:	RTYPE	a = ZERO;
accum:	a |= IVAL;
final:	IRESULT = a;
d39 3
a41 3
init:	RTYPE	a = ZERO;
accum:	a &= IVAL
final:	IRESULT = a;
d50 3
a52 3
init:	RTYPE	a = ZERO;
accum:	a += IVAL;
final:	IRESULT = a;
d58 3
a60 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL>a) a = IVAL;
final:	IRESULT = a;
d66 3
a68 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL<a) a = IVAL;
final:	IRESULT = a;
d77 3
a79 3
init:	RTYPE	a = ZERO;
accum:	a += IVAL;
final:	IRESULT = a;
d85 3
a87 3
init:	RTYPE	a = ZERO;
accum:	a *= IVAL;
final:	IRESULT = a;
d93 3
a95 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL>a) a = IVAL;
final:	IRESULT = a;
d101 3
a103 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL<a) a = IVAL;
final:	IRESULT = a;
d112 3
a114 3
init:	RTYPE	a = ZERO;
accum:	a += IVAL;
final:	IRESULT = a;
d120 3
a122 3
init:	RTYPE	a = ZERO;
accum:	a *= IVAL;
final:	IRESULT = a;
d128 3
a130 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL>a) a = IVAL;
final:	IRESULT = a;
d136 3
a138 3
init:	RTYPE	a = ZERO;
accum:	if (IVAL<a) a = IVAL;
final:	IRESULT = a;
d147 3
a149 3
init:	RTYPE	a = ZERO;
accum:	a += IVAL;
final:	IRESULT = a;
d155 3
a157 3
init:	RTYPE	a = ZERO;
accum:	a *= IVAL;
final:	IRESULT = a;
@


1.1
log
@Initial revision
@
text
@d7 4
a10 1
# $Log: int-convolutions.desc,v $
d15 1
a15 1
neighborhood int neighborhood_sum IA_Bit zero=0
d23 1
a23 1
neighborhood IA_Bit neighborhood_max IA_Bit zero=0
d31 1
a31 1
neighborhood IA_Bit neighborhood_min IA_Bit zero=1
d42 1
a42 1
neighborhood int neighborhood_sum u_char zero=0
d50 1
a50 1
neighborhood u_char neighborhood_max u_char zero=0
d58 1
a58 1
neighborhood u_char neighborhood_min u_char zero=255
d69 1
a69 1
neighborhood int neighborhood_sum int zero=0
d77 1
a77 1
neighborhood int neighborhood_product int zero=1
d85 1
a85 1
neighborhood int neighborhood_max int zero=-MAXINT
d93 1
a93 1
neighborhood int neighborhood_min int zero=MAXINT
d104 1
a104 1
neighborhood float neighborhood_sum float zero=0
d112 1
a112 1
neighborhood float neighborhood_product float zero=1
d120 1
a120 1
neighborhood float neighborhood_max float zero=-infinity()
d128 1
a128 1
neighborhood float neighborhood_min float zero=infinity()
d139 1
a139 1
neighborhood complex neighborhood_sum complex zero=0
d147 1
a147 1
neighborhood complex neighborhood_product complex zero=1
@
