doc/web: Use repo.or.cz terminology for the summary page.
[Ale.git] / ale_accum.h
blob1a9664e761d42fdc45ca37e5124ab1f5bb84574c
1 // Copyright 2002, 2004 David Hilvert <dhilvert@auricle.dyndns.org>,
2 // <dhilvert@ugcs.caltech.edu>
4 /* This file is part of the Anti-Lamenessing Engine.
6 The Anti-Lamenessing Engine is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 The Anti-Lamenessing Engine is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with the Anti-Lamenessing Engine; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __ale_accum_h__
22 #define __ale_accum_h__
24 #include "ale_fixed.h"
26 #define FIXED16 4
27 #define FIXED32 5
30 * Real-valued type used when accumulating over the domain of an image.
33 #if ALE_COLORS == FIXED16
35 typedef ale_fixed<ale_fixed_16_accum,12> ale_accum;
37 #define ale_accum_enable_casting() ale_accum::enable_casting()
38 #define ale_accum_disable_casting() ale_accum::disable_casting()
40 #elif ALE_COLORS == FIXED32
42 typedef ale_fixed<ale_fixed_32_accum,15> ale_accum;
44 #define ale_accum_enable_casting() ale_accum::enable_casting()
45 #define ale_accum_disable_casting() ale_accum::disable_casting()
47 #else
49 typedef double ale_accum;
51 #define ale_accum_disable_casting()
52 #define ale_accum_enable_casting()
54 #endif
56 #undef FIXED32
57 #undef FIXED16
59 #endif