source: Sophya/trunk/Poubelle/DPC:FitsIOServer/Blitz/blitz/update.h@ 1036

Last change on this file since 1036 was 658, checked in by ansari, 26 years ago

no message

File size: 2.7 KB
Line 
1/***************************************************************************
2 * blitz/update.h Declaration of the _bz_XXXX updater classes
3 *
4 * $Id: update.h,v 1.1.1.1 1999-11-26 16:37:05 ansari Exp $
5 *
6 * Copyright (C) 1997,1998 Todd Veldhuizen <tveldhui@seurat.uwaterloo.ca>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * Suggestions: blitz-suggest@cybervision.com
19 * Bugs: blitz-bugs@cybervision.com
20 *
21 * For more information, please see the Blitz++ Home Page:
22 * http://seurat.uwaterloo.ca/blitz/
23 *
24 ***************************************************************************
25 * $Log: not supported by cvs2svn $
26 * Revision 1.1.1.1 1999/04/09 17:58:59 ansari
27 * Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99
28 *
29 * Revision 1.5 1998/03/14 00:04:47 tveldhui
30 * 0.2-alpha-05
31 *
32 * Revision 1.4 1997/07/16 14:51:20 tveldhui
33 * Update: Alpha release 0.2 (Arrays)
34 *
35 * Revision 1.3 1997/01/24 14:42:00 tveldhui
36 * Periodic RCS update
37 *
38 * Revision 1.2 1997/01/23 03:28:28 tveldhui
39 * Periodic RCS update
40 *
41 * Revision 1.1 1997/01/13 22:19:58 tveldhui
42 * Periodic RCS update
43 *
44 *
45 */
46
47#ifndef BZ_UPDATE_H
48#define BZ_UPDATE_H
49
50#ifndef BZ_BLITZ_H
51 #include <blitz/blitz.h>
52#endif
53
54BZ_NAMESPACE(blitz)
55
56class _bz_updater_base { };
57
58#define BZ_DECL_UPDATER(name,op,symbol) \
59 template<class X, class Y> \
60 class name : public _bz_updater_base { \
61 public: \
62 static inline void update(X& _bz_restrict x, Y y) \
63 { x op y; } \
64 static void prettyPrint(string& str) \
65 { str += symbol; } \
66 }
67
68BZ_DECL_UPDATER(_bz_update, =, "=");
69BZ_DECL_UPDATER(_bz_plus_update, +=, "+=");
70BZ_DECL_UPDATER(_bz_minus_update, -=, "-=");
71BZ_DECL_UPDATER(_bz_multiply_update, *=, "*=");
72BZ_DECL_UPDATER(_bz_divide_update, /=, "/=");
73BZ_DECL_UPDATER(_bz_mod_update, %=, "%=");
74BZ_DECL_UPDATER(_bz_xor_update, ^=, "^=");
75BZ_DECL_UPDATER(_bz_bitand_update, &=, "&=");
76BZ_DECL_UPDATER(_bz_bitor_update, |=, "|=");
77BZ_DECL_UPDATER(_bz_shiftl_update, <<=, "<<=");
78BZ_DECL_UPDATER(_bz_shiftr_update, >>=, ">>=");
79
80BZ_NAMESPACE_END
81
82#endif // BZ_UPDATE_H
83
Note: See TracBrowser for help on using the repository browser.