00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00024 #pragma implementation
00025 #endif
00026
00027 #ifdef HAVE_CONFIG_H
00028 #include <config.h>
00029 #endif
00030
00031 #include <iostream>
00032
00033 #include "ArrayN.h"
00034 #include "Array-util.h"
00035
00036
00037 #include "MArray.h"
00038 #include "MArray2.h"
00039 #include "MArrayN.h"
00040 #include "MArray-defs.h"
00041 #include "boolMatrix.h"
00042 #include "boolNDArray.h"
00043 #include "mx-op-defs.h"
00044 #include "so-array.h"
00045
00046 boolNDArray
00047 streamoff_array::all (int dim) const
00048 {
00049 MX_ND_ANY_ALL_REDUCTION (MX_ND_ALL_EVAL (MX_ND_ALL_EXPR), true);
00050 }
00051
00052 boolNDArray
00053 streamoff_array::any (int dim) const
00054 {
00055 MX_ND_ANY_ALL_REDUCTION (MX_ND_ANY_EVAL (MX_ND_ANY_EXPR), false);
00056 }
00057
00058 streamoff_array&
00059 operator += (streamoff_array& a, const std::streamoff& s)
00060 {
00061 DO_VS_OP2 (std::streamoff, a, +=, s)
00062 return a;
00063 }
00064
00065 streamoff_array&
00066 operator -= (streamoff_array& a, const std::streamoff& s)
00067 {
00068 DO_VS_OP2 (std::streamoff, a, -=, s);
00069 return a;
00070 }
00071
00072 streamoff_array&
00073 operator += (streamoff_array& a, const streamoff_array& b)
00074 {
00075 int l = a.length ();
00076 if (l > 0)
00077 {
00078 int bl = b.length ();
00079 if (l != bl)
00080 gripe_nonconformant ("operator +=", l, bl);
00081 else
00082 DO_VV_OP2 (std::streamoff, a, +=, b);
00083 }
00084 return a;
00085 }
00086
00087 streamoff_array&
00088 operator -= (streamoff_array& a, const streamoff_array& b)
00089 {
00090 int l = a.length ();
00091 if (l > 0)
00092 {
00093 int bl = b.length ();
00094 if (l != bl)
00095 gripe_nonconformant ("operator -=", l, bl);
00096 else
00097 DO_VV_OP2 (std::streamoff, a, -=, b);
00098 }
00099 return a;
00100 }
00101
00102 int
00103 streamoff_array::compute_index (Array<int>& ra_idx,
00104 const dim_vector& dimensions)
00105 {
00106 return ::compute_index (ra_idx, dimensions);
00107 }
00108
00109 SND_CMP_OP (mx_el_eq, ==, std::streamoff, , streamoff_array, )
00110 SND_CMP_OP (mx_el_ne, !=, std::streamoff, , streamoff_array, )
00111
00112 NDS_CMP_OP (mx_el_eq, ==, streamoff_array, , std::streamoff, )
00113 NDS_CMP_OP (mx_el_ne, !=, streamoff_array, , std::streamoff, )
00114
00115 NDND_CMP_OP (mx_el_eq, ==, streamoff_array, , streamoff_array, )
00116 NDND_CMP_OP (mx_el_ne, !=, streamoff_array, , streamoff_array, )
00117
00118 NDND_BIN_OP (streamoff_array, operator +,
00119 streamoff_array, streamoff_array, mx_inline_add)
00120
00121 NDND_BIN_OP (streamoff_array, operator -,
00122 streamoff_array, streamoff_array, mx_inline_subtract)
00123
00124
00125 NDS_BIN_OP (streamoff_array, operator +,
00126 streamoff_array, std::streamoff, mx_inline_add)
00127
00128 NDS_BIN_OP (streamoff_array, operator -,
00129 streamoff_array, std::streamoff, mx_inline_subtract)
00130
00131
00132 SND_BIN_OP (streamoff_array, operator +,
00133 std::streamoff, streamoff_array, mx_inline_add)
00134
00135 SND_BIN_OP (streamoff_array, operator -,
00136 std::streamoff, streamoff_array, mx_inline_subtract)
00137
00138
00139
00140
00141
00142