source: Sophya/trunk/Poubelle/DPC:FitsIOServer/Blitz/blitz/array/asexpr.h@ 658

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

no message

File size: 759 bytes
RevLine 
[658]1#ifndef BZ_ARRAYASEXPR_H
2#define BZ_ARRAYASEXPR_H
3
4#ifndef BZ_ARRAY_H
5 #error <blitz/array/asexpr.h> must be included via <blitz/array.h>
6#endif
7
8BZ_NAMESPACE(blitz)
9
10// The traits class asExpr converts arbitrary things to
11// expression templatable operands.
12
13// Default to scalar.
14template<class T>
15struct asExpr {
16 typedef _bz_ArrayExprConstant<T> T_expr;
17};
18
19// Already an expression template term
20template<class T>
21struct asExpr<_bz_ArrayExpr<T> > {
22 typedef _bz_ArrayExpr<T> T_expr;
23};
24
25// An array operand
26template<class T, int N>
27struct asExpr<Array<T,N> > {
28 typedef ArrayIterator<T,N> T_expr;
29};
30
31// Index placeholder
32template<int N>
33struct asExpr<IndexPlaceholder<N> > {
34 typedef IndexPlaceholder<N> T_expr;
35};
36
37BZ_NAMESPACE_END
38
39#endif
Note: See TracBrowser for help on using the repository browser.