| 1 | /*************************************************************************** | 
|---|
| 2 | * blitz/vecuops.cc     Expression templates for vectors, unary functions | 
|---|
| 3 | * | 
|---|
| 4 | * $Id: vecuops.cc,v 1.1.1.1 1999-11-26 16:37:06 ansari Exp $ | 
|---|
| 5 | * | 
|---|
| 6 | * This program is free software; you can redistribute it and/or | 
|---|
| 7 | * modify it under the terms of the GNU General Public License | 
|---|
| 8 | * as published by the Free Software Foundation; either version 2 | 
|---|
| 9 | * of the License, or (at your option) any later version. | 
|---|
| 10 | * | 
|---|
| 11 | * This program 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. | 
|---|
| 15 | * | 
|---|
| 16 | * Suggestions:          blitz-suggest@cybervision.com | 
|---|
| 17 | * Bugs:                 blitz-bugs@cybervision.com | 
|---|
| 18 | * | 
|---|
| 19 | * For more information, please see the Blitz++ Home Page: | 
|---|
| 20 | *    http://seurat.uwaterloo.ca/blitz/ | 
|---|
| 21 | * | 
|---|
| 22 | *************************************************************************** | 
|---|
| 23 | * $Log: not supported by cvs2svn $ | 
|---|
| 24 | // Revision 1.1.1.1  1999/04/09  17:59:00  ansari | 
|---|
| 25 | // Creation module DPC/Blitz (blitz 0.4) Reza 09/04/99 | 
|---|
| 26 | // | 
|---|
| 27 | */ | 
|---|
| 28 |  | 
|---|
| 29 | // Generated source file.  Do not edit. | 
|---|
| 30 | // genvecuops.cpp Jun 10 1998 16:03:50 | 
|---|
| 31 |  | 
|---|
| 32 | #ifndef BZ_VECUOPS_CC | 
|---|
| 33 | #define BZ_VECUOPS_CC | 
|---|
| 34 |  | 
|---|
| 35 | #ifndef BZ_VECEXPR_H | 
|---|
| 36 | #error <blitz/vecuops.cc> must be included via <blitz/vecexpr.h> | 
|---|
| 37 | #endif // BZ_VECEXPR_H | 
|---|
| 38 |  | 
|---|
| 39 | BZ_NAMESPACE(blitz) | 
|---|
| 40 |  | 
|---|
| 41 | /**************************************************************************** | 
|---|
| 42 | * abs | 
|---|
| 43 | ****************************************************************************/ | 
|---|
| 44 |  | 
|---|
| 45 | template<class P_numtype1> | 
|---|
| 46 | inline | 
|---|
| 47 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 48 | _bz_abs<P_numtype1> > > | 
|---|
| 49 | abs(const Vector<P_numtype1>& d1) | 
|---|
| 50 | { | 
|---|
| 51 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 52 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 53 |  | 
|---|
| 54 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 55 | } | 
|---|
| 56 |  | 
|---|
| 57 | template<class P_expr1> | 
|---|
| 58 | inline | 
|---|
| 59 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 60 | _bz_abs<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 61 | abs(_bz_VecExpr<P_expr1> d1) | 
|---|
| 62 | { | 
|---|
| 63 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 64 | _bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 65 |  | 
|---|
| 66 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 67 | } | 
|---|
| 68 |  | 
|---|
| 69 | template<class P_numtype1> | 
|---|
| 70 | inline | 
|---|
| 71 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 72 | _bz_abs<P_numtype1> > > | 
|---|
| 73 | abs(const VectorPick<P_numtype1>& d1) | 
|---|
| 74 | { | 
|---|
| 75 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 76 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 77 |  | 
|---|
| 78 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 79 | } | 
|---|
| 80 |  | 
|---|
| 81 |  | 
|---|
| 82 | inline | 
|---|
| 83 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 84 | _bz_abs<int> > > | 
|---|
| 85 | abs(Range d1) | 
|---|
| 86 | { | 
|---|
| 87 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 88 | _bz_abs<int> > T_expr; | 
|---|
| 89 |  | 
|---|
| 90 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 91 | } | 
|---|
| 92 |  | 
|---|
| 93 | template<class P_numtype1, int N_length1> | 
|---|
| 94 | inline | 
|---|
| 95 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 96 | _bz_abs<P_numtype1> > > | 
|---|
| 97 | abs(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 98 | { | 
|---|
| 99 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 100 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 101 |  | 
|---|
| 102 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 103 | } | 
|---|
| 104 |  | 
|---|
| 105 |  | 
|---|
| 106 | /**************************************************************************** | 
|---|
| 107 | * acos | 
|---|
| 108 | ****************************************************************************/ | 
|---|
| 109 |  | 
|---|
| 110 | template<class P_numtype1> | 
|---|
| 111 | inline | 
|---|
| 112 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 113 | _bz_acos<P_numtype1> > > | 
|---|
| 114 | acos(const Vector<P_numtype1>& d1) | 
|---|
| 115 | { | 
|---|
| 116 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 117 | _bz_acos<P_numtype1> > T_expr; | 
|---|
| 118 |  | 
|---|
| 119 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 120 | } | 
|---|
| 121 |  | 
|---|
| 122 | template<class P_expr1> | 
|---|
| 123 | inline | 
|---|
| 124 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 125 | _bz_acos<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 126 | acos(_bz_VecExpr<P_expr1> d1) | 
|---|
| 127 | { | 
|---|
| 128 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 129 | _bz_acos<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 130 |  | 
|---|
| 131 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 132 | } | 
|---|
| 133 |  | 
|---|
| 134 | template<class P_numtype1> | 
|---|
| 135 | inline | 
|---|
| 136 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 137 | _bz_acos<P_numtype1> > > | 
|---|
| 138 | acos(const VectorPick<P_numtype1>& d1) | 
|---|
| 139 | { | 
|---|
| 140 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 141 | _bz_acos<P_numtype1> > T_expr; | 
|---|
| 142 |  | 
|---|
| 143 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 144 | } | 
|---|
| 145 |  | 
|---|
| 146 |  | 
|---|
| 147 | inline | 
|---|
| 148 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 149 | _bz_acos<int> > > | 
|---|
| 150 | acos(Range d1) | 
|---|
| 151 | { | 
|---|
| 152 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 153 | _bz_acos<int> > T_expr; | 
|---|
| 154 |  | 
|---|
| 155 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 156 | } | 
|---|
| 157 |  | 
|---|
| 158 | template<class P_numtype1, int N_length1> | 
|---|
| 159 | inline | 
|---|
| 160 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 161 | _bz_acos<P_numtype1> > > | 
|---|
| 162 | acos(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 163 | { | 
|---|
| 164 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 165 | _bz_acos<P_numtype1> > T_expr; | 
|---|
| 166 |  | 
|---|
| 167 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 168 | } | 
|---|
| 169 |  | 
|---|
| 170 |  | 
|---|
| 171 | /**************************************************************************** | 
|---|
| 172 | * acosh | 
|---|
| 173 | ****************************************************************************/ | 
|---|
| 174 |  | 
|---|
| 175 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 176 | template<class P_numtype1> | 
|---|
| 177 | inline | 
|---|
| 178 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 179 | _bz_acosh<P_numtype1> > > | 
|---|
| 180 | acosh(const Vector<P_numtype1>& d1) | 
|---|
| 181 | { | 
|---|
| 182 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 183 | _bz_acosh<P_numtype1> > T_expr; | 
|---|
| 184 |  | 
|---|
| 185 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 186 | } | 
|---|
| 187 |  | 
|---|
| 188 | template<class P_expr1> | 
|---|
| 189 | inline | 
|---|
| 190 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 191 | _bz_acosh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 192 | acosh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 193 | { | 
|---|
| 194 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 195 | _bz_acosh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 196 |  | 
|---|
| 197 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 198 | } | 
|---|
| 199 |  | 
|---|
| 200 | template<class P_numtype1> | 
|---|
| 201 | inline | 
|---|
| 202 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 203 | _bz_acosh<P_numtype1> > > | 
|---|
| 204 | acosh(const VectorPick<P_numtype1>& d1) | 
|---|
| 205 | { | 
|---|
| 206 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 207 | _bz_acosh<P_numtype1> > T_expr; | 
|---|
| 208 |  | 
|---|
| 209 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 210 | } | 
|---|
| 211 |  | 
|---|
| 212 |  | 
|---|
| 213 | inline | 
|---|
| 214 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 215 | _bz_acosh<int> > > | 
|---|
| 216 | acosh(Range d1) | 
|---|
| 217 | { | 
|---|
| 218 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 219 | _bz_acosh<int> > T_expr; | 
|---|
| 220 |  | 
|---|
| 221 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 222 | } | 
|---|
| 223 |  | 
|---|
| 224 | template<class P_numtype1, int N_length1> | 
|---|
| 225 | inline | 
|---|
| 226 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 227 | _bz_acosh<P_numtype1> > > | 
|---|
| 228 | acosh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 229 | { | 
|---|
| 230 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 231 | _bz_acosh<P_numtype1> > T_expr; | 
|---|
| 232 |  | 
|---|
| 233 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 234 | } | 
|---|
| 235 |  | 
|---|
| 236 | #endif | 
|---|
| 237 |  | 
|---|
| 238 | /**************************************************************************** | 
|---|
| 239 | * asin | 
|---|
| 240 | ****************************************************************************/ | 
|---|
| 241 |  | 
|---|
| 242 | template<class P_numtype1> | 
|---|
| 243 | inline | 
|---|
| 244 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 245 | _bz_asin<P_numtype1> > > | 
|---|
| 246 | asin(const Vector<P_numtype1>& d1) | 
|---|
| 247 | { | 
|---|
| 248 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 249 | _bz_asin<P_numtype1> > T_expr; | 
|---|
| 250 |  | 
|---|
| 251 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 252 | } | 
|---|
| 253 |  | 
|---|
| 254 | template<class P_expr1> | 
|---|
| 255 | inline | 
|---|
| 256 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 257 | _bz_asin<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 258 | asin(_bz_VecExpr<P_expr1> d1) | 
|---|
| 259 | { | 
|---|
| 260 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 261 | _bz_asin<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 262 |  | 
|---|
| 263 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 264 | } | 
|---|
| 265 |  | 
|---|
| 266 | template<class P_numtype1> | 
|---|
| 267 | inline | 
|---|
| 268 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 269 | _bz_asin<P_numtype1> > > | 
|---|
| 270 | asin(const VectorPick<P_numtype1>& d1) | 
|---|
| 271 | { | 
|---|
| 272 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 273 | _bz_asin<P_numtype1> > T_expr; | 
|---|
| 274 |  | 
|---|
| 275 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 276 | } | 
|---|
| 277 |  | 
|---|
| 278 |  | 
|---|
| 279 | inline | 
|---|
| 280 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 281 | _bz_asin<int> > > | 
|---|
| 282 | asin(Range d1) | 
|---|
| 283 | { | 
|---|
| 284 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 285 | _bz_asin<int> > T_expr; | 
|---|
| 286 |  | 
|---|
| 287 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 288 | } | 
|---|
| 289 |  | 
|---|
| 290 | template<class P_numtype1, int N_length1> | 
|---|
| 291 | inline | 
|---|
| 292 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 293 | _bz_asin<P_numtype1> > > | 
|---|
| 294 | asin(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 295 | { | 
|---|
| 296 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 297 | _bz_asin<P_numtype1> > T_expr; | 
|---|
| 298 |  | 
|---|
| 299 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 300 | } | 
|---|
| 301 |  | 
|---|
| 302 |  | 
|---|
| 303 | /**************************************************************************** | 
|---|
| 304 | * asinh | 
|---|
| 305 | ****************************************************************************/ | 
|---|
| 306 |  | 
|---|
| 307 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 308 | template<class P_numtype1> | 
|---|
| 309 | inline | 
|---|
| 310 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 311 | _bz_asinh<P_numtype1> > > | 
|---|
| 312 | asinh(const Vector<P_numtype1>& d1) | 
|---|
| 313 | { | 
|---|
| 314 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 315 | _bz_asinh<P_numtype1> > T_expr; | 
|---|
| 316 |  | 
|---|
| 317 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 318 | } | 
|---|
| 319 |  | 
|---|
| 320 | template<class P_expr1> | 
|---|
| 321 | inline | 
|---|
| 322 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 323 | _bz_asinh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 324 | asinh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 325 | { | 
|---|
| 326 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 327 | _bz_asinh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 328 |  | 
|---|
| 329 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 330 | } | 
|---|
| 331 |  | 
|---|
| 332 | template<class P_numtype1> | 
|---|
| 333 | inline | 
|---|
| 334 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 335 | _bz_asinh<P_numtype1> > > | 
|---|
| 336 | asinh(const VectorPick<P_numtype1>& d1) | 
|---|
| 337 | { | 
|---|
| 338 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 339 | _bz_asinh<P_numtype1> > T_expr; | 
|---|
| 340 |  | 
|---|
| 341 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 342 | } | 
|---|
| 343 |  | 
|---|
| 344 |  | 
|---|
| 345 | inline | 
|---|
| 346 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 347 | _bz_asinh<int> > > | 
|---|
| 348 | asinh(Range d1) | 
|---|
| 349 | { | 
|---|
| 350 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 351 | _bz_asinh<int> > T_expr; | 
|---|
| 352 |  | 
|---|
| 353 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 354 | } | 
|---|
| 355 |  | 
|---|
| 356 | template<class P_numtype1, int N_length1> | 
|---|
| 357 | inline | 
|---|
| 358 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 359 | _bz_asinh<P_numtype1> > > | 
|---|
| 360 | asinh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 361 | { | 
|---|
| 362 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 363 | _bz_asinh<P_numtype1> > T_expr; | 
|---|
| 364 |  | 
|---|
| 365 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 366 | } | 
|---|
| 367 |  | 
|---|
| 368 | #endif | 
|---|
| 369 |  | 
|---|
| 370 | /**************************************************************************** | 
|---|
| 371 | * atan | 
|---|
| 372 | ****************************************************************************/ | 
|---|
| 373 |  | 
|---|
| 374 | template<class P_numtype1> | 
|---|
| 375 | inline | 
|---|
| 376 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 377 | _bz_atan<P_numtype1> > > | 
|---|
| 378 | atan(const Vector<P_numtype1>& d1) | 
|---|
| 379 | { | 
|---|
| 380 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 381 | _bz_atan<P_numtype1> > T_expr; | 
|---|
| 382 |  | 
|---|
| 383 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 384 | } | 
|---|
| 385 |  | 
|---|
| 386 | template<class P_expr1> | 
|---|
| 387 | inline | 
|---|
| 388 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 389 | _bz_atan<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 390 | atan(_bz_VecExpr<P_expr1> d1) | 
|---|
| 391 | { | 
|---|
| 392 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 393 | _bz_atan<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 394 |  | 
|---|
| 395 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 396 | } | 
|---|
| 397 |  | 
|---|
| 398 | template<class P_numtype1> | 
|---|
| 399 | inline | 
|---|
| 400 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 401 | _bz_atan<P_numtype1> > > | 
|---|
| 402 | atan(const VectorPick<P_numtype1>& d1) | 
|---|
| 403 | { | 
|---|
| 404 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 405 | _bz_atan<P_numtype1> > T_expr; | 
|---|
| 406 |  | 
|---|
| 407 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 408 | } | 
|---|
| 409 |  | 
|---|
| 410 |  | 
|---|
| 411 | inline | 
|---|
| 412 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 413 | _bz_atan<int> > > | 
|---|
| 414 | atan(Range d1) | 
|---|
| 415 | { | 
|---|
| 416 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 417 | _bz_atan<int> > T_expr; | 
|---|
| 418 |  | 
|---|
| 419 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 420 | } | 
|---|
| 421 |  | 
|---|
| 422 | template<class P_numtype1, int N_length1> | 
|---|
| 423 | inline | 
|---|
| 424 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 425 | _bz_atan<P_numtype1> > > | 
|---|
| 426 | atan(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 427 | { | 
|---|
| 428 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 429 | _bz_atan<P_numtype1> > T_expr; | 
|---|
| 430 |  | 
|---|
| 431 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 432 | } | 
|---|
| 433 |  | 
|---|
| 434 |  | 
|---|
| 435 | /**************************************************************************** | 
|---|
| 436 | * atanh | 
|---|
| 437 | ****************************************************************************/ | 
|---|
| 438 |  | 
|---|
| 439 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 440 | template<class P_numtype1> | 
|---|
| 441 | inline | 
|---|
| 442 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 443 | _bz_atanh<P_numtype1> > > | 
|---|
| 444 | atanh(const Vector<P_numtype1>& d1) | 
|---|
| 445 | { | 
|---|
| 446 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 447 | _bz_atanh<P_numtype1> > T_expr; | 
|---|
| 448 |  | 
|---|
| 449 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 450 | } | 
|---|
| 451 |  | 
|---|
| 452 | template<class P_expr1> | 
|---|
| 453 | inline | 
|---|
| 454 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 455 | _bz_atanh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 456 | atanh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 457 | { | 
|---|
| 458 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 459 | _bz_atanh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 460 |  | 
|---|
| 461 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 462 | } | 
|---|
| 463 |  | 
|---|
| 464 | template<class P_numtype1> | 
|---|
| 465 | inline | 
|---|
| 466 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 467 | _bz_atanh<P_numtype1> > > | 
|---|
| 468 | atanh(const VectorPick<P_numtype1>& d1) | 
|---|
| 469 | { | 
|---|
| 470 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 471 | _bz_atanh<P_numtype1> > T_expr; | 
|---|
| 472 |  | 
|---|
| 473 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 474 | } | 
|---|
| 475 |  | 
|---|
| 476 |  | 
|---|
| 477 | inline | 
|---|
| 478 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 479 | _bz_atanh<int> > > | 
|---|
| 480 | atanh(Range d1) | 
|---|
| 481 | { | 
|---|
| 482 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 483 | _bz_atanh<int> > T_expr; | 
|---|
| 484 |  | 
|---|
| 485 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 486 | } | 
|---|
| 487 |  | 
|---|
| 488 | template<class P_numtype1, int N_length1> | 
|---|
| 489 | inline | 
|---|
| 490 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 491 | _bz_atanh<P_numtype1> > > | 
|---|
| 492 | atanh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 493 | { | 
|---|
| 494 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 495 | _bz_atanh<P_numtype1> > T_expr; | 
|---|
| 496 |  | 
|---|
| 497 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 498 | } | 
|---|
| 499 |  | 
|---|
| 500 | #endif | 
|---|
| 501 |  | 
|---|
| 502 | /**************************************************************************** | 
|---|
| 503 | * _class | 
|---|
| 504 | ****************************************************************************/ | 
|---|
| 505 |  | 
|---|
| 506 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 507 | template<class P_numtype1> | 
|---|
| 508 | inline | 
|---|
| 509 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 510 | _bz__class<P_numtype1> > > | 
|---|
| 511 | _class(const Vector<P_numtype1>& d1) | 
|---|
| 512 | { | 
|---|
| 513 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 514 | _bz__class<P_numtype1> > T_expr; | 
|---|
| 515 |  | 
|---|
| 516 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 517 | } | 
|---|
| 518 |  | 
|---|
| 519 | template<class P_expr1> | 
|---|
| 520 | inline | 
|---|
| 521 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 522 | _bz__class<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 523 | _class(_bz_VecExpr<P_expr1> d1) | 
|---|
| 524 | { | 
|---|
| 525 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 526 | _bz__class<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 527 |  | 
|---|
| 528 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 529 | } | 
|---|
| 530 |  | 
|---|
| 531 | template<class P_numtype1> | 
|---|
| 532 | inline | 
|---|
| 533 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 534 | _bz__class<P_numtype1> > > | 
|---|
| 535 | _class(const VectorPick<P_numtype1>& d1) | 
|---|
| 536 | { | 
|---|
| 537 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 538 | _bz__class<P_numtype1> > T_expr; | 
|---|
| 539 |  | 
|---|
| 540 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 541 | } | 
|---|
| 542 |  | 
|---|
| 543 |  | 
|---|
| 544 | inline | 
|---|
| 545 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 546 | _bz__class<int> > > | 
|---|
| 547 | _class(Range d1) | 
|---|
| 548 | { | 
|---|
| 549 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 550 | _bz__class<int> > T_expr; | 
|---|
| 551 |  | 
|---|
| 552 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 553 | } | 
|---|
| 554 |  | 
|---|
| 555 | template<class P_numtype1, int N_length1> | 
|---|
| 556 | inline | 
|---|
| 557 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 558 | _bz__class<P_numtype1> > > | 
|---|
| 559 | _class(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 560 | { | 
|---|
| 561 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 562 | _bz__class<P_numtype1> > T_expr; | 
|---|
| 563 |  | 
|---|
| 564 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 565 | } | 
|---|
| 566 |  | 
|---|
| 567 | #endif | 
|---|
| 568 |  | 
|---|
| 569 | /**************************************************************************** | 
|---|
| 570 | * cbrt | 
|---|
| 571 | ****************************************************************************/ | 
|---|
| 572 |  | 
|---|
| 573 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 574 | template<class P_numtype1> | 
|---|
| 575 | inline | 
|---|
| 576 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 577 | _bz_cbrt<P_numtype1> > > | 
|---|
| 578 | cbrt(const Vector<P_numtype1>& d1) | 
|---|
| 579 | { | 
|---|
| 580 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 581 | _bz_cbrt<P_numtype1> > T_expr; | 
|---|
| 582 |  | 
|---|
| 583 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 584 | } | 
|---|
| 585 |  | 
|---|
| 586 | template<class P_expr1> | 
|---|
| 587 | inline | 
|---|
| 588 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 589 | _bz_cbrt<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 590 | cbrt(_bz_VecExpr<P_expr1> d1) | 
|---|
| 591 | { | 
|---|
| 592 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 593 | _bz_cbrt<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 594 |  | 
|---|
| 595 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 596 | } | 
|---|
| 597 |  | 
|---|
| 598 | template<class P_numtype1> | 
|---|
| 599 | inline | 
|---|
| 600 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 601 | _bz_cbrt<P_numtype1> > > | 
|---|
| 602 | cbrt(const VectorPick<P_numtype1>& d1) | 
|---|
| 603 | { | 
|---|
| 604 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 605 | _bz_cbrt<P_numtype1> > T_expr; | 
|---|
| 606 |  | 
|---|
| 607 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 608 | } | 
|---|
| 609 |  | 
|---|
| 610 |  | 
|---|
| 611 | inline | 
|---|
| 612 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 613 | _bz_cbrt<int> > > | 
|---|
| 614 | cbrt(Range d1) | 
|---|
| 615 | { | 
|---|
| 616 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 617 | _bz_cbrt<int> > T_expr; | 
|---|
| 618 |  | 
|---|
| 619 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 620 | } | 
|---|
| 621 |  | 
|---|
| 622 | template<class P_numtype1, int N_length1> | 
|---|
| 623 | inline | 
|---|
| 624 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 625 | _bz_cbrt<P_numtype1> > > | 
|---|
| 626 | cbrt(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 627 | { | 
|---|
| 628 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 629 | _bz_cbrt<P_numtype1> > T_expr; | 
|---|
| 630 |  | 
|---|
| 631 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 632 | } | 
|---|
| 633 |  | 
|---|
| 634 | #endif | 
|---|
| 635 |  | 
|---|
| 636 | /**************************************************************************** | 
|---|
| 637 | * ceil | 
|---|
| 638 | ****************************************************************************/ | 
|---|
| 639 |  | 
|---|
| 640 | template<class P_numtype1> | 
|---|
| 641 | inline | 
|---|
| 642 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 643 | _bz_ceil<P_numtype1> > > | 
|---|
| 644 | ceil(const Vector<P_numtype1>& d1) | 
|---|
| 645 | { | 
|---|
| 646 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 647 | _bz_ceil<P_numtype1> > T_expr; | 
|---|
| 648 |  | 
|---|
| 649 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 650 | } | 
|---|
| 651 |  | 
|---|
| 652 | template<class P_expr1> | 
|---|
| 653 | inline | 
|---|
| 654 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 655 | _bz_ceil<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 656 | ceil(_bz_VecExpr<P_expr1> d1) | 
|---|
| 657 | { | 
|---|
| 658 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 659 | _bz_ceil<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 660 |  | 
|---|
| 661 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 662 | } | 
|---|
| 663 |  | 
|---|
| 664 | template<class P_numtype1> | 
|---|
| 665 | inline | 
|---|
| 666 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 667 | _bz_ceil<P_numtype1> > > | 
|---|
| 668 | ceil(const VectorPick<P_numtype1>& d1) | 
|---|
| 669 | { | 
|---|
| 670 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 671 | _bz_ceil<P_numtype1> > T_expr; | 
|---|
| 672 |  | 
|---|
| 673 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 674 | } | 
|---|
| 675 |  | 
|---|
| 676 |  | 
|---|
| 677 | inline | 
|---|
| 678 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 679 | _bz_ceil<int> > > | 
|---|
| 680 | ceil(Range d1) | 
|---|
| 681 | { | 
|---|
| 682 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 683 | _bz_ceil<int> > T_expr; | 
|---|
| 684 |  | 
|---|
| 685 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 686 | } | 
|---|
| 687 |  | 
|---|
| 688 | template<class P_numtype1, int N_length1> | 
|---|
| 689 | inline | 
|---|
| 690 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 691 | _bz_ceil<P_numtype1> > > | 
|---|
| 692 | ceil(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 693 | { | 
|---|
| 694 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 695 | _bz_ceil<P_numtype1> > T_expr; | 
|---|
| 696 |  | 
|---|
| 697 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 698 | } | 
|---|
| 699 |  | 
|---|
| 700 |  | 
|---|
| 701 | /**************************************************************************** | 
|---|
| 702 | * cos | 
|---|
| 703 | ****************************************************************************/ | 
|---|
| 704 |  | 
|---|
| 705 | template<class P_numtype1> | 
|---|
| 706 | inline | 
|---|
| 707 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 708 | _bz_cos<P_numtype1> > > | 
|---|
| 709 | cos(const Vector<P_numtype1>& d1) | 
|---|
| 710 | { | 
|---|
| 711 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 712 | _bz_cos<P_numtype1> > T_expr; | 
|---|
| 713 |  | 
|---|
| 714 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 715 | } | 
|---|
| 716 |  | 
|---|
| 717 | template<class P_expr1> | 
|---|
| 718 | inline | 
|---|
| 719 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 720 | _bz_cos<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 721 | cos(_bz_VecExpr<P_expr1> d1) | 
|---|
| 722 | { | 
|---|
| 723 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 724 | _bz_cos<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 725 |  | 
|---|
| 726 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 727 | } | 
|---|
| 728 |  | 
|---|
| 729 | template<class P_numtype1> | 
|---|
| 730 | inline | 
|---|
| 731 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 732 | _bz_cos<P_numtype1> > > | 
|---|
| 733 | cos(const VectorPick<P_numtype1>& d1) | 
|---|
| 734 | { | 
|---|
| 735 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 736 | _bz_cos<P_numtype1> > T_expr; | 
|---|
| 737 |  | 
|---|
| 738 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 739 | } | 
|---|
| 740 |  | 
|---|
| 741 |  | 
|---|
| 742 | inline | 
|---|
| 743 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 744 | _bz_cos<int> > > | 
|---|
| 745 | cos(Range d1) | 
|---|
| 746 | { | 
|---|
| 747 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 748 | _bz_cos<int> > T_expr; | 
|---|
| 749 |  | 
|---|
| 750 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 751 | } | 
|---|
| 752 |  | 
|---|
| 753 | template<class P_numtype1, int N_length1> | 
|---|
| 754 | inline | 
|---|
| 755 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 756 | _bz_cos<P_numtype1> > > | 
|---|
| 757 | cos(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 758 | { | 
|---|
| 759 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 760 | _bz_cos<P_numtype1> > T_expr; | 
|---|
| 761 |  | 
|---|
| 762 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 763 | } | 
|---|
| 764 |  | 
|---|
| 765 |  | 
|---|
| 766 | /**************************************************************************** | 
|---|
| 767 | * cosh | 
|---|
| 768 | ****************************************************************************/ | 
|---|
| 769 |  | 
|---|
| 770 | template<class P_numtype1> | 
|---|
| 771 | inline | 
|---|
| 772 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 773 | _bz_cosh<P_numtype1> > > | 
|---|
| 774 | cosh(const Vector<P_numtype1>& d1) | 
|---|
| 775 | { | 
|---|
| 776 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 777 | _bz_cosh<P_numtype1> > T_expr; | 
|---|
| 778 |  | 
|---|
| 779 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 780 | } | 
|---|
| 781 |  | 
|---|
| 782 | template<class P_expr1> | 
|---|
| 783 | inline | 
|---|
| 784 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 785 | _bz_cosh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 786 | cosh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 787 | { | 
|---|
| 788 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 789 | _bz_cosh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 790 |  | 
|---|
| 791 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 792 | } | 
|---|
| 793 |  | 
|---|
| 794 | template<class P_numtype1> | 
|---|
| 795 | inline | 
|---|
| 796 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 797 | _bz_cosh<P_numtype1> > > | 
|---|
| 798 | cosh(const VectorPick<P_numtype1>& d1) | 
|---|
| 799 | { | 
|---|
| 800 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 801 | _bz_cosh<P_numtype1> > T_expr; | 
|---|
| 802 |  | 
|---|
| 803 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 804 | } | 
|---|
| 805 |  | 
|---|
| 806 |  | 
|---|
| 807 | inline | 
|---|
| 808 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 809 | _bz_cosh<int> > > | 
|---|
| 810 | cosh(Range d1) | 
|---|
| 811 | { | 
|---|
| 812 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 813 | _bz_cosh<int> > T_expr; | 
|---|
| 814 |  | 
|---|
| 815 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 816 | } | 
|---|
| 817 |  | 
|---|
| 818 | template<class P_numtype1, int N_length1> | 
|---|
| 819 | inline | 
|---|
| 820 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 821 | _bz_cosh<P_numtype1> > > | 
|---|
| 822 | cosh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 823 | { | 
|---|
| 824 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 825 | _bz_cosh<P_numtype1> > T_expr; | 
|---|
| 826 |  | 
|---|
| 827 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 828 | } | 
|---|
| 829 |  | 
|---|
| 830 |  | 
|---|
| 831 | /**************************************************************************** | 
|---|
| 832 | * exp | 
|---|
| 833 | ****************************************************************************/ | 
|---|
| 834 |  | 
|---|
| 835 | template<class P_numtype1> | 
|---|
| 836 | inline | 
|---|
| 837 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 838 | _bz_exp<P_numtype1> > > | 
|---|
| 839 | exp(const Vector<P_numtype1>& d1) | 
|---|
| 840 | { | 
|---|
| 841 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 842 | _bz_exp<P_numtype1> > T_expr; | 
|---|
| 843 |  | 
|---|
| 844 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 845 | } | 
|---|
| 846 |  | 
|---|
| 847 | template<class P_expr1> | 
|---|
| 848 | inline | 
|---|
| 849 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 850 | _bz_exp<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 851 | exp(_bz_VecExpr<P_expr1> d1) | 
|---|
| 852 | { | 
|---|
| 853 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 854 | _bz_exp<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 855 |  | 
|---|
| 856 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 857 | } | 
|---|
| 858 |  | 
|---|
| 859 | template<class P_numtype1> | 
|---|
| 860 | inline | 
|---|
| 861 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 862 | _bz_exp<P_numtype1> > > | 
|---|
| 863 | exp(const VectorPick<P_numtype1>& d1) | 
|---|
| 864 | { | 
|---|
| 865 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 866 | _bz_exp<P_numtype1> > T_expr; | 
|---|
| 867 |  | 
|---|
| 868 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 869 | } | 
|---|
| 870 |  | 
|---|
| 871 |  | 
|---|
| 872 | inline | 
|---|
| 873 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 874 | _bz_exp<int> > > | 
|---|
| 875 | exp(Range d1) | 
|---|
| 876 | { | 
|---|
| 877 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 878 | _bz_exp<int> > T_expr; | 
|---|
| 879 |  | 
|---|
| 880 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 881 | } | 
|---|
| 882 |  | 
|---|
| 883 | template<class P_numtype1, int N_length1> | 
|---|
| 884 | inline | 
|---|
| 885 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 886 | _bz_exp<P_numtype1> > > | 
|---|
| 887 | exp(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 888 | { | 
|---|
| 889 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 890 | _bz_exp<P_numtype1> > T_expr; | 
|---|
| 891 |  | 
|---|
| 892 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 893 | } | 
|---|
| 894 |  | 
|---|
| 895 |  | 
|---|
| 896 | /**************************************************************************** | 
|---|
| 897 | * expm1 | 
|---|
| 898 | ****************************************************************************/ | 
|---|
| 899 |  | 
|---|
| 900 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 901 | template<class P_numtype1> | 
|---|
| 902 | inline | 
|---|
| 903 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 904 | _bz_expm1<P_numtype1> > > | 
|---|
| 905 | expm1(const Vector<P_numtype1>& d1) | 
|---|
| 906 | { | 
|---|
| 907 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 908 | _bz_expm1<P_numtype1> > T_expr; | 
|---|
| 909 |  | 
|---|
| 910 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 911 | } | 
|---|
| 912 |  | 
|---|
| 913 | template<class P_expr1> | 
|---|
| 914 | inline | 
|---|
| 915 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 916 | _bz_expm1<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 917 | expm1(_bz_VecExpr<P_expr1> d1) | 
|---|
| 918 | { | 
|---|
| 919 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 920 | _bz_expm1<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 921 |  | 
|---|
| 922 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 923 | } | 
|---|
| 924 |  | 
|---|
| 925 | template<class P_numtype1> | 
|---|
| 926 | inline | 
|---|
| 927 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 928 | _bz_expm1<P_numtype1> > > | 
|---|
| 929 | expm1(const VectorPick<P_numtype1>& d1) | 
|---|
| 930 | { | 
|---|
| 931 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 932 | _bz_expm1<P_numtype1> > T_expr; | 
|---|
| 933 |  | 
|---|
| 934 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 935 | } | 
|---|
| 936 |  | 
|---|
| 937 |  | 
|---|
| 938 | inline | 
|---|
| 939 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 940 | _bz_expm1<int> > > | 
|---|
| 941 | expm1(Range d1) | 
|---|
| 942 | { | 
|---|
| 943 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 944 | _bz_expm1<int> > T_expr; | 
|---|
| 945 |  | 
|---|
| 946 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 947 | } | 
|---|
| 948 |  | 
|---|
| 949 | template<class P_numtype1, int N_length1> | 
|---|
| 950 | inline | 
|---|
| 951 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 952 | _bz_expm1<P_numtype1> > > | 
|---|
| 953 | expm1(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 954 | { | 
|---|
| 955 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 956 | _bz_expm1<P_numtype1> > T_expr; | 
|---|
| 957 |  | 
|---|
| 958 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 959 | } | 
|---|
| 960 |  | 
|---|
| 961 | #endif | 
|---|
| 962 |  | 
|---|
| 963 | /**************************************************************************** | 
|---|
| 964 | * erf | 
|---|
| 965 | ****************************************************************************/ | 
|---|
| 966 |  | 
|---|
| 967 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 968 | template<class P_numtype1> | 
|---|
| 969 | inline | 
|---|
| 970 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 971 | _bz_erf<P_numtype1> > > | 
|---|
| 972 | erf(const Vector<P_numtype1>& d1) | 
|---|
| 973 | { | 
|---|
| 974 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 975 | _bz_erf<P_numtype1> > T_expr; | 
|---|
| 976 |  | 
|---|
| 977 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 978 | } | 
|---|
| 979 |  | 
|---|
| 980 | template<class P_expr1> | 
|---|
| 981 | inline | 
|---|
| 982 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 983 | _bz_erf<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 984 | erf(_bz_VecExpr<P_expr1> d1) | 
|---|
| 985 | { | 
|---|
| 986 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 987 | _bz_erf<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 988 |  | 
|---|
| 989 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 990 | } | 
|---|
| 991 |  | 
|---|
| 992 | template<class P_numtype1> | 
|---|
| 993 | inline | 
|---|
| 994 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 995 | _bz_erf<P_numtype1> > > | 
|---|
| 996 | erf(const VectorPick<P_numtype1>& d1) | 
|---|
| 997 | { | 
|---|
| 998 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 999 | _bz_erf<P_numtype1> > T_expr; | 
|---|
| 1000 |  | 
|---|
| 1001 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1002 | } | 
|---|
| 1003 |  | 
|---|
| 1004 |  | 
|---|
| 1005 | inline | 
|---|
| 1006 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1007 | _bz_erf<int> > > | 
|---|
| 1008 | erf(Range d1) | 
|---|
| 1009 | { | 
|---|
| 1010 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1011 | _bz_erf<int> > T_expr; | 
|---|
| 1012 |  | 
|---|
| 1013 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1014 | } | 
|---|
| 1015 |  | 
|---|
| 1016 | template<class P_numtype1, int N_length1> | 
|---|
| 1017 | inline | 
|---|
| 1018 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1019 | _bz_erf<P_numtype1> > > | 
|---|
| 1020 | erf(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1021 | { | 
|---|
| 1022 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1023 | _bz_erf<P_numtype1> > T_expr; | 
|---|
| 1024 |  | 
|---|
| 1025 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1026 | } | 
|---|
| 1027 |  | 
|---|
| 1028 | #endif | 
|---|
| 1029 |  | 
|---|
| 1030 | /**************************************************************************** | 
|---|
| 1031 | * erfc | 
|---|
| 1032 | ****************************************************************************/ | 
|---|
| 1033 |  | 
|---|
| 1034 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1035 | template<class P_numtype1> | 
|---|
| 1036 | inline | 
|---|
| 1037 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1038 | _bz_erfc<P_numtype1> > > | 
|---|
| 1039 | erfc(const Vector<P_numtype1>& d1) | 
|---|
| 1040 | { | 
|---|
| 1041 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1042 | _bz_erfc<P_numtype1> > T_expr; | 
|---|
| 1043 |  | 
|---|
| 1044 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1045 | } | 
|---|
| 1046 |  | 
|---|
| 1047 | template<class P_expr1> | 
|---|
| 1048 | inline | 
|---|
| 1049 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1050 | _bz_erfc<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1051 | erfc(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1052 | { | 
|---|
| 1053 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1054 | _bz_erfc<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1055 |  | 
|---|
| 1056 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1057 | } | 
|---|
| 1058 |  | 
|---|
| 1059 | template<class P_numtype1> | 
|---|
| 1060 | inline | 
|---|
| 1061 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1062 | _bz_erfc<P_numtype1> > > | 
|---|
| 1063 | erfc(const VectorPick<P_numtype1>& d1) | 
|---|
| 1064 | { | 
|---|
| 1065 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1066 | _bz_erfc<P_numtype1> > T_expr; | 
|---|
| 1067 |  | 
|---|
| 1068 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1069 | } | 
|---|
| 1070 |  | 
|---|
| 1071 |  | 
|---|
| 1072 | inline | 
|---|
| 1073 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1074 | _bz_erfc<int> > > | 
|---|
| 1075 | erfc(Range d1) | 
|---|
| 1076 | { | 
|---|
| 1077 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1078 | _bz_erfc<int> > T_expr; | 
|---|
| 1079 |  | 
|---|
| 1080 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1081 | } | 
|---|
| 1082 |  | 
|---|
| 1083 | template<class P_numtype1, int N_length1> | 
|---|
| 1084 | inline | 
|---|
| 1085 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1086 | _bz_erfc<P_numtype1> > > | 
|---|
| 1087 | erfc(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1088 | { | 
|---|
| 1089 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1090 | _bz_erfc<P_numtype1> > T_expr; | 
|---|
| 1091 |  | 
|---|
| 1092 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1093 | } | 
|---|
| 1094 |  | 
|---|
| 1095 | #endif | 
|---|
| 1096 |  | 
|---|
| 1097 | /**************************************************************************** | 
|---|
| 1098 | * fabs | 
|---|
| 1099 | ****************************************************************************/ | 
|---|
| 1100 |  | 
|---|
| 1101 | template<class P_numtype1> | 
|---|
| 1102 | inline | 
|---|
| 1103 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1104 | _bz_abs<P_numtype1> > > | 
|---|
| 1105 | fabs(const Vector<P_numtype1>& d1) | 
|---|
| 1106 | { | 
|---|
| 1107 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1108 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 1109 |  | 
|---|
| 1110 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1111 | } | 
|---|
| 1112 |  | 
|---|
| 1113 | template<class P_expr1> | 
|---|
| 1114 | inline | 
|---|
| 1115 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1116 | _bz_abs<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1117 | fabs(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1118 | { | 
|---|
| 1119 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1120 | _bz_abs<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1121 |  | 
|---|
| 1122 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1123 | } | 
|---|
| 1124 |  | 
|---|
| 1125 | template<class P_numtype1> | 
|---|
| 1126 | inline | 
|---|
| 1127 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1128 | _bz_abs<P_numtype1> > > | 
|---|
| 1129 | fabs(const VectorPick<P_numtype1>& d1) | 
|---|
| 1130 | { | 
|---|
| 1131 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1132 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 1133 |  | 
|---|
| 1134 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1135 | } | 
|---|
| 1136 |  | 
|---|
| 1137 |  | 
|---|
| 1138 | inline | 
|---|
| 1139 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1140 | _bz_abs<int> > > | 
|---|
| 1141 | fabs(Range d1) | 
|---|
| 1142 | { | 
|---|
| 1143 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1144 | _bz_abs<int> > T_expr; | 
|---|
| 1145 |  | 
|---|
| 1146 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1147 | } | 
|---|
| 1148 |  | 
|---|
| 1149 | template<class P_numtype1, int N_length1> | 
|---|
| 1150 | inline | 
|---|
| 1151 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1152 | _bz_abs<P_numtype1> > > | 
|---|
| 1153 | fabs(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1154 | { | 
|---|
| 1155 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1156 | _bz_abs<P_numtype1> > T_expr; | 
|---|
| 1157 |  | 
|---|
| 1158 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1159 | } | 
|---|
| 1160 |  | 
|---|
| 1161 |  | 
|---|
| 1162 | /**************************************************************************** | 
|---|
| 1163 | * finite | 
|---|
| 1164 | ****************************************************************************/ | 
|---|
| 1165 |  | 
|---|
| 1166 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1167 | template<class P_numtype1> | 
|---|
| 1168 | inline | 
|---|
| 1169 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1170 | _bz_finite<P_numtype1> > > | 
|---|
| 1171 | finite(const Vector<P_numtype1>& d1) | 
|---|
| 1172 | { | 
|---|
| 1173 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1174 | _bz_finite<P_numtype1> > T_expr; | 
|---|
| 1175 |  | 
|---|
| 1176 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1177 | } | 
|---|
| 1178 |  | 
|---|
| 1179 | template<class P_expr1> | 
|---|
| 1180 | inline | 
|---|
| 1181 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1182 | _bz_finite<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1183 | finite(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1184 | { | 
|---|
| 1185 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1186 | _bz_finite<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1187 |  | 
|---|
| 1188 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1189 | } | 
|---|
| 1190 |  | 
|---|
| 1191 | template<class P_numtype1> | 
|---|
| 1192 | inline | 
|---|
| 1193 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1194 | _bz_finite<P_numtype1> > > | 
|---|
| 1195 | finite(const VectorPick<P_numtype1>& d1) | 
|---|
| 1196 | { | 
|---|
| 1197 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1198 | _bz_finite<P_numtype1> > T_expr; | 
|---|
| 1199 |  | 
|---|
| 1200 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1201 | } | 
|---|
| 1202 |  | 
|---|
| 1203 |  | 
|---|
| 1204 | inline | 
|---|
| 1205 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1206 | _bz_finite<int> > > | 
|---|
| 1207 | finite(Range d1) | 
|---|
| 1208 | { | 
|---|
| 1209 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1210 | _bz_finite<int> > T_expr; | 
|---|
| 1211 |  | 
|---|
| 1212 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1213 | } | 
|---|
| 1214 |  | 
|---|
| 1215 | template<class P_numtype1, int N_length1> | 
|---|
| 1216 | inline | 
|---|
| 1217 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1218 | _bz_finite<P_numtype1> > > | 
|---|
| 1219 | finite(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1220 | { | 
|---|
| 1221 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1222 | _bz_finite<P_numtype1> > T_expr; | 
|---|
| 1223 |  | 
|---|
| 1224 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1225 | } | 
|---|
| 1226 |  | 
|---|
| 1227 | #endif | 
|---|
| 1228 |  | 
|---|
| 1229 | /**************************************************************************** | 
|---|
| 1230 | * floor | 
|---|
| 1231 | ****************************************************************************/ | 
|---|
| 1232 |  | 
|---|
| 1233 | template<class P_numtype1> | 
|---|
| 1234 | inline | 
|---|
| 1235 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1236 | _bz_floor<P_numtype1> > > | 
|---|
| 1237 | floor(const Vector<P_numtype1>& d1) | 
|---|
| 1238 | { | 
|---|
| 1239 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1240 | _bz_floor<P_numtype1> > T_expr; | 
|---|
| 1241 |  | 
|---|
| 1242 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1243 | } | 
|---|
| 1244 |  | 
|---|
| 1245 | template<class P_expr1> | 
|---|
| 1246 | inline | 
|---|
| 1247 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1248 | _bz_floor<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1249 | floor(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1250 | { | 
|---|
| 1251 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1252 | _bz_floor<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1253 |  | 
|---|
| 1254 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1255 | } | 
|---|
| 1256 |  | 
|---|
| 1257 | template<class P_numtype1> | 
|---|
| 1258 | inline | 
|---|
| 1259 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1260 | _bz_floor<P_numtype1> > > | 
|---|
| 1261 | floor(const VectorPick<P_numtype1>& d1) | 
|---|
| 1262 | { | 
|---|
| 1263 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1264 | _bz_floor<P_numtype1> > T_expr; | 
|---|
| 1265 |  | 
|---|
| 1266 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1267 | } | 
|---|
| 1268 |  | 
|---|
| 1269 |  | 
|---|
| 1270 | inline | 
|---|
| 1271 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1272 | _bz_floor<int> > > | 
|---|
| 1273 | floor(Range d1) | 
|---|
| 1274 | { | 
|---|
| 1275 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1276 | _bz_floor<int> > T_expr; | 
|---|
| 1277 |  | 
|---|
| 1278 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1279 | } | 
|---|
| 1280 |  | 
|---|
| 1281 | template<class P_numtype1, int N_length1> | 
|---|
| 1282 | inline | 
|---|
| 1283 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1284 | _bz_floor<P_numtype1> > > | 
|---|
| 1285 | floor(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1286 | { | 
|---|
| 1287 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1288 | _bz_floor<P_numtype1> > T_expr; | 
|---|
| 1289 |  | 
|---|
| 1290 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1291 | } | 
|---|
| 1292 |  | 
|---|
| 1293 |  | 
|---|
| 1294 | /**************************************************************************** | 
|---|
| 1295 | * ilogb | 
|---|
| 1296 | ****************************************************************************/ | 
|---|
| 1297 |  | 
|---|
| 1298 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 1299 | template<class P_numtype1> | 
|---|
| 1300 | inline | 
|---|
| 1301 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1302 | _bz_ilogb<P_numtype1> > > | 
|---|
| 1303 | ilogb(const Vector<P_numtype1>& d1) | 
|---|
| 1304 | { | 
|---|
| 1305 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1306 | _bz_ilogb<P_numtype1> > T_expr; | 
|---|
| 1307 |  | 
|---|
| 1308 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1309 | } | 
|---|
| 1310 |  | 
|---|
| 1311 | template<class P_expr1> | 
|---|
| 1312 | inline | 
|---|
| 1313 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1314 | _bz_ilogb<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1315 | ilogb(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1316 | { | 
|---|
| 1317 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1318 | _bz_ilogb<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1319 |  | 
|---|
| 1320 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1321 | } | 
|---|
| 1322 |  | 
|---|
| 1323 | template<class P_numtype1> | 
|---|
| 1324 | inline | 
|---|
| 1325 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1326 | _bz_ilogb<P_numtype1> > > | 
|---|
| 1327 | ilogb(const VectorPick<P_numtype1>& d1) | 
|---|
| 1328 | { | 
|---|
| 1329 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1330 | _bz_ilogb<P_numtype1> > T_expr; | 
|---|
| 1331 |  | 
|---|
| 1332 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1333 | } | 
|---|
| 1334 |  | 
|---|
| 1335 |  | 
|---|
| 1336 | inline | 
|---|
| 1337 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1338 | _bz_ilogb<int> > > | 
|---|
| 1339 | ilogb(Range d1) | 
|---|
| 1340 | { | 
|---|
| 1341 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1342 | _bz_ilogb<int> > T_expr; | 
|---|
| 1343 |  | 
|---|
| 1344 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1345 | } | 
|---|
| 1346 |  | 
|---|
| 1347 | template<class P_numtype1, int N_length1> | 
|---|
| 1348 | inline | 
|---|
| 1349 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1350 | _bz_ilogb<P_numtype1> > > | 
|---|
| 1351 | ilogb(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1352 | { | 
|---|
| 1353 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1354 | _bz_ilogb<P_numtype1> > T_expr; | 
|---|
| 1355 |  | 
|---|
| 1356 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1357 | } | 
|---|
| 1358 |  | 
|---|
| 1359 | #endif | 
|---|
| 1360 |  | 
|---|
| 1361 | /**************************************************************************** | 
|---|
| 1362 | * isnan | 
|---|
| 1363 | ****************************************************************************/ | 
|---|
| 1364 |  | 
|---|
| 1365 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1366 | template<class P_numtype1> | 
|---|
| 1367 | inline | 
|---|
| 1368 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1369 | _bz_isnan<P_numtype1> > > | 
|---|
| 1370 | isnan(const Vector<P_numtype1>& d1) | 
|---|
| 1371 | { | 
|---|
| 1372 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1373 | _bz_isnan<P_numtype1> > T_expr; | 
|---|
| 1374 |  | 
|---|
| 1375 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1376 | } | 
|---|
| 1377 |  | 
|---|
| 1378 | template<class P_expr1> | 
|---|
| 1379 | inline | 
|---|
| 1380 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1381 | _bz_isnan<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1382 | isnan(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1383 | { | 
|---|
| 1384 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1385 | _bz_isnan<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1386 |  | 
|---|
| 1387 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1388 | } | 
|---|
| 1389 |  | 
|---|
| 1390 | template<class P_numtype1> | 
|---|
| 1391 | inline | 
|---|
| 1392 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1393 | _bz_isnan<P_numtype1> > > | 
|---|
| 1394 | isnan(const VectorPick<P_numtype1>& d1) | 
|---|
| 1395 | { | 
|---|
| 1396 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1397 | _bz_isnan<P_numtype1> > T_expr; | 
|---|
| 1398 |  | 
|---|
| 1399 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1400 | } | 
|---|
| 1401 |  | 
|---|
| 1402 |  | 
|---|
| 1403 | inline | 
|---|
| 1404 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1405 | _bz_isnan<int> > > | 
|---|
| 1406 | isnan(Range d1) | 
|---|
| 1407 | { | 
|---|
| 1408 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1409 | _bz_isnan<int> > T_expr; | 
|---|
| 1410 |  | 
|---|
| 1411 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1412 | } | 
|---|
| 1413 |  | 
|---|
| 1414 | template<class P_numtype1, int N_length1> | 
|---|
| 1415 | inline | 
|---|
| 1416 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1417 | _bz_isnan<P_numtype1> > > | 
|---|
| 1418 | isnan(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1419 | { | 
|---|
| 1420 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1421 | _bz_isnan<P_numtype1> > T_expr; | 
|---|
| 1422 |  | 
|---|
| 1423 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1424 | } | 
|---|
| 1425 |  | 
|---|
| 1426 | #endif | 
|---|
| 1427 |  | 
|---|
| 1428 | /**************************************************************************** | 
|---|
| 1429 | * itrunc | 
|---|
| 1430 | ****************************************************************************/ | 
|---|
| 1431 |  | 
|---|
| 1432 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 1433 | template<class P_numtype1> | 
|---|
| 1434 | inline | 
|---|
| 1435 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1436 | _bz_itrunc<P_numtype1> > > | 
|---|
| 1437 | itrunc(const Vector<P_numtype1>& d1) | 
|---|
| 1438 | { | 
|---|
| 1439 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1440 | _bz_itrunc<P_numtype1> > T_expr; | 
|---|
| 1441 |  | 
|---|
| 1442 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1443 | } | 
|---|
| 1444 |  | 
|---|
| 1445 | template<class P_expr1> | 
|---|
| 1446 | inline | 
|---|
| 1447 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1448 | _bz_itrunc<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1449 | itrunc(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1450 | { | 
|---|
| 1451 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1452 | _bz_itrunc<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1453 |  | 
|---|
| 1454 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1455 | } | 
|---|
| 1456 |  | 
|---|
| 1457 | template<class P_numtype1> | 
|---|
| 1458 | inline | 
|---|
| 1459 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1460 | _bz_itrunc<P_numtype1> > > | 
|---|
| 1461 | itrunc(const VectorPick<P_numtype1>& d1) | 
|---|
| 1462 | { | 
|---|
| 1463 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1464 | _bz_itrunc<P_numtype1> > T_expr; | 
|---|
| 1465 |  | 
|---|
| 1466 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1467 | } | 
|---|
| 1468 |  | 
|---|
| 1469 |  | 
|---|
| 1470 | inline | 
|---|
| 1471 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1472 | _bz_itrunc<int> > > | 
|---|
| 1473 | itrunc(Range d1) | 
|---|
| 1474 | { | 
|---|
| 1475 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1476 | _bz_itrunc<int> > T_expr; | 
|---|
| 1477 |  | 
|---|
| 1478 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1479 | } | 
|---|
| 1480 |  | 
|---|
| 1481 | template<class P_numtype1, int N_length1> | 
|---|
| 1482 | inline | 
|---|
| 1483 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1484 | _bz_itrunc<P_numtype1> > > | 
|---|
| 1485 | itrunc(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1486 | { | 
|---|
| 1487 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1488 | _bz_itrunc<P_numtype1> > T_expr; | 
|---|
| 1489 |  | 
|---|
| 1490 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1491 | } | 
|---|
| 1492 |  | 
|---|
| 1493 | #endif | 
|---|
| 1494 |  | 
|---|
| 1495 | /**************************************************************************** | 
|---|
| 1496 | * j0 | 
|---|
| 1497 | ****************************************************************************/ | 
|---|
| 1498 |  | 
|---|
| 1499 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1500 | template<class P_numtype1> | 
|---|
| 1501 | inline | 
|---|
| 1502 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1503 | _bz_j0<P_numtype1> > > | 
|---|
| 1504 | j0(const Vector<P_numtype1>& d1) | 
|---|
| 1505 | { | 
|---|
| 1506 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1507 | _bz_j0<P_numtype1> > T_expr; | 
|---|
| 1508 |  | 
|---|
| 1509 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1510 | } | 
|---|
| 1511 |  | 
|---|
| 1512 | template<class P_expr1> | 
|---|
| 1513 | inline | 
|---|
| 1514 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1515 | _bz_j0<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1516 | j0(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1517 | { | 
|---|
| 1518 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1519 | _bz_j0<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1520 |  | 
|---|
| 1521 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1522 | } | 
|---|
| 1523 |  | 
|---|
| 1524 | template<class P_numtype1> | 
|---|
| 1525 | inline | 
|---|
| 1526 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1527 | _bz_j0<P_numtype1> > > | 
|---|
| 1528 | j0(const VectorPick<P_numtype1>& d1) | 
|---|
| 1529 | { | 
|---|
| 1530 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1531 | _bz_j0<P_numtype1> > T_expr; | 
|---|
| 1532 |  | 
|---|
| 1533 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1534 | } | 
|---|
| 1535 |  | 
|---|
| 1536 |  | 
|---|
| 1537 | inline | 
|---|
| 1538 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1539 | _bz_j0<int> > > | 
|---|
| 1540 | j0(Range d1) | 
|---|
| 1541 | { | 
|---|
| 1542 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1543 | _bz_j0<int> > T_expr; | 
|---|
| 1544 |  | 
|---|
| 1545 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1546 | } | 
|---|
| 1547 |  | 
|---|
| 1548 | template<class P_numtype1, int N_length1> | 
|---|
| 1549 | inline | 
|---|
| 1550 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1551 | _bz_j0<P_numtype1> > > | 
|---|
| 1552 | j0(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1553 | { | 
|---|
| 1554 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1555 | _bz_j0<P_numtype1> > T_expr; | 
|---|
| 1556 |  | 
|---|
| 1557 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1558 | } | 
|---|
| 1559 |  | 
|---|
| 1560 | #endif | 
|---|
| 1561 |  | 
|---|
| 1562 | /**************************************************************************** | 
|---|
| 1563 | * j1 | 
|---|
| 1564 | ****************************************************************************/ | 
|---|
| 1565 |  | 
|---|
| 1566 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1567 | template<class P_numtype1> | 
|---|
| 1568 | inline | 
|---|
| 1569 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1570 | _bz_j1<P_numtype1> > > | 
|---|
| 1571 | j1(const Vector<P_numtype1>& d1) | 
|---|
| 1572 | { | 
|---|
| 1573 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1574 | _bz_j1<P_numtype1> > T_expr; | 
|---|
| 1575 |  | 
|---|
| 1576 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1577 | } | 
|---|
| 1578 |  | 
|---|
| 1579 | template<class P_expr1> | 
|---|
| 1580 | inline | 
|---|
| 1581 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1582 | _bz_j1<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1583 | j1(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1584 | { | 
|---|
| 1585 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1586 | _bz_j1<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1587 |  | 
|---|
| 1588 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1589 | } | 
|---|
| 1590 |  | 
|---|
| 1591 | template<class P_numtype1> | 
|---|
| 1592 | inline | 
|---|
| 1593 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1594 | _bz_j1<P_numtype1> > > | 
|---|
| 1595 | j1(const VectorPick<P_numtype1>& d1) | 
|---|
| 1596 | { | 
|---|
| 1597 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1598 | _bz_j1<P_numtype1> > T_expr; | 
|---|
| 1599 |  | 
|---|
| 1600 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1601 | } | 
|---|
| 1602 |  | 
|---|
| 1603 |  | 
|---|
| 1604 | inline | 
|---|
| 1605 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1606 | _bz_j1<int> > > | 
|---|
| 1607 | j1(Range d1) | 
|---|
| 1608 | { | 
|---|
| 1609 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1610 | _bz_j1<int> > T_expr; | 
|---|
| 1611 |  | 
|---|
| 1612 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1613 | } | 
|---|
| 1614 |  | 
|---|
| 1615 | template<class P_numtype1, int N_length1> | 
|---|
| 1616 | inline | 
|---|
| 1617 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1618 | _bz_j1<P_numtype1> > > | 
|---|
| 1619 | j1(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1620 | { | 
|---|
| 1621 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1622 | _bz_j1<P_numtype1> > T_expr; | 
|---|
| 1623 |  | 
|---|
| 1624 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1625 | } | 
|---|
| 1626 |  | 
|---|
| 1627 | #endif | 
|---|
| 1628 |  | 
|---|
| 1629 | /**************************************************************************** | 
|---|
| 1630 | * lgamma | 
|---|
| 1631 | ****************************************************************************/ | 
|---|
| 1632 |  | 
|---|
| 1633 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1634 | template<class P_numtype1> | 
|---|
| 1635 | inline | 
|---|
| 1636 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1637 | _bz_lgamma<P_numtype1> > > | 
|---|
| 1638 | lgamma(const Vector<P_numtype1>& d1) | 
|---|
| 1639 | { | 
|---|
| 1640 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1641 | _bz_lgamma<P_numtype1> > T_expr; | 
|---|
| 1642 |  | 
|---|
| 1643 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1644 | } | 
|---|
| 1645 |  | 
|---|
| 1646 | template<class P_expr1> | 
|---|
| 1647 | inline | 
|---|
| 1648 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1649 | _bz_lgamma<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1650 | lgamma(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1651 | { | 
|---|
| 1652 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1653 | _bz_lgamma<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1654 |  | 
|---|
| 1655 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1656 | } | 
|---|
| 1657 |  | 
|---|
| 1658 | template<class P_numtype1> | 
|---|
| 1659 | inline | 
|---|
| 1660 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1661 | _bz_lgamma<P_numtype1> > > | 
|---|
| 1662 | lgamma(const VectorPick<P_numtype1>& d1) | 
|---|
| 1663 | { | 
|---|
| 1664 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1665 | _bz_lgamma<P_numtype1> > T_expr; | 
|---|
| 1666 |  | 
|---|
| 1667 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1668 | } | 
|---|
| 1669 |  | 
|---|
| 1670 |  | 
|---|
| 1671 | inline | 
|---|
| 1672 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1673 | _bz_lgamma<int> > > | 
|---|
| 1674 | lgamma(Range d1) | 
|---|
| 1675 | { | 
|---|
| 1676 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1677 | _bz_lgamma<int> > T_expr; | 
|---|
| 1678 |  | 
|---|
| 1679 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1680 | } | 
|---|
| 1681 |  | 
|---|
| 1682 | template<class P_numtype1, int N_length1> | 
|---|
| 1683 | inline | 
|---|
| 1684 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1685 | _bz_lgamma<P_numtype1> > > | 
|---|
| 1686 | lgamma(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1687 | { | 
|---|
| 1688 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1689 | _bz_lgamma<P_numtype1> > T_expr; | 
|---|
| 1690 |  | 
|---|
| 1691 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1692 | } | 
|---|
| 1693 |  | 
|---|
| 1694 | #endif | 
|---|
| 1695 |  | 
|---|
| 1696 | /**************************************************************************** | 
|---|
| 1697 | * log | 
|---|
| 1698 | ****************************************************************************/ | 
|---|
| 1699 |  | 
|---|
| 1700 | template<class P_numtype1> | 
|---|
| 1701 | inline | 
|---|
| 1702 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1703 | _bz_log<P_numtype1> > > | 
|---|
| 1704 | log(const Vector<P_numtype1>& d1) | 
|---|
| 1705 | { | 
|---|
| 1706 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1707 | _bz_log<P_numtype1> > T_expr; | 
|---|
| 1708 |  | 
|---|
| 1709 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1710 | } | 
|---|
| 1711 |  | 
|---|
| 1712 | template<class P_expr1> | 
|---|
| 1713 | inline | 
|---|
| 1714 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1715 | _bz_log<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1716 | log(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1717 | { | 
|---|
| 1718 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1719 | _bz_log<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1720 |  | 
|---|
| 1721 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1722 | } | 
|---|
| 1723 |  | 
|---|
| 1724 | template<class P_numtype1> | 
|---|
| 1725 | inline | 
|---|
| 1726 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1727 | _bz_log<P_numtype1> > > | 
|---|
| 1728 | log(const VectorPick<P_numtype1>& d1) | 
|---|
| 1729 | { | 
|---|
| 1730 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1731 | _bz_log<P_numtype1> > T_expr; | 
|---|
| 1732 |  | 
|---|
| 1733 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1734 | } | 
|---|
| 1735 |  | 
|---|
| 1736 |  | 
|---|
| 1737 | inline | 
|---|
| 1738 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1739 | _bz_log<int> > > | 
|---|
| 1740 | log(Range d1) | 
|---|
| 1741 | { | 
|---|
| 1742 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1743 | _bz_log<int> > T_expr; | 
|---|
| 1744 |  | 
|---|
| 1745 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1746 | } | 
|---|
| 1747 |  | 
|---|
| 1748 | template<class P_numtype1, int N_length1> | 
|---|
| 1749 | inline | 
|---|
| 1750 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1751 | _bz_log<P_numtype1> > > | 
|---|
| 1752 | log(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1753 | { | 
|---|
| 1754 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1755 | _bz_log<P_numtype1> > T_expr; | 
|---|
| 1756 |  | 
|---|
| 1757 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1758 | } | 
|---|
| 1759 |  | 
|---|
| 1760 |  | 
|---|
| 1761 | /**************************************************************************** | 
|---|
| 1762 | * logb | 
|---|
| 1763 | ****************************************************************************/ | 
|---|
| 1764 |  | 
|---|
| 1765 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1766 | template<class P_numtype1> | 
|---|
| 1767 | inline | 
|---|
| 1768 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1769 | _bz_logb<P_numtype1> > > | 
|---|
| 1770 | logb(const Vector<P_numtype1>& d1) | 
|---|
| 1771 | { | 
|---|
| 1772 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1773 | _bz_logb<P_numtype1> > T_expr; | 
|---|
| 1774 |  | 
|---|
| 1775 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1776 | } | 
|---|
| 1777 |  | 
|---|
| 1778 | template<class P_expr1> | 
|---|
| 1779 | inline | 
|---|
| 1780 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1781 | _bz_logb<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1782 | logb(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1783 | { | 
|---|
| 1784 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1785 | _bz_logb<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1786 |  | 
|---|
| 1787 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1788 | } | 
|---|
| 1789 |  | 
|---|
| 1790 | template<class P_numtype1> | 
|---|
| 1791 | inline | 
|---|
| 1792 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1793 | _bz_logb<P_numtype1> > > | 
|---|
| 1794 | logb(const VectorPick<P_numtype1>& d1) | 
|---|
| 1795 | { | 
|---|
| 1796 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1797 | _bz_logb<P_numtype1> > T_expr; | 
|---|
| 1798 |  | 
|---|
| 1799 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1800 | } | 
|---|
| 1801 |  | 
|---|
| 1802 |  | 
|---|
| 1803 | inline | 
|---|
| 1804 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1805 | _bz_logb<int> > > | 
|---|
| 1806 | logb(Range d1) | 
|---|
| 1807 | { | 
|---|
| 1808 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1809 | _bz_logb<int> > T_expr; | 
|---|
| 1810 |  | 
|---|
| 1811 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1812 | } | 
|---|
| 1813 |  | 
|---|
| 1814 | template<class P_numtype1, int N_length1> | 
|---|
| 1815 | inline | 
|---|
| 1816 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1817 | _bz_logb<P_numtype1> > > | 
|---|
| 1818 | logb(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1819 | { | 
|---|
| 1820 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1821 | _bz_logb<P_numtype1> > T_expr; | 
|---|
| 1822 |  | 
|---|
| 1823 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1824 | } | 
|---|
| 1825 |  | 
|---|
| 1826 | #endif | 
|---|
| 1827 |  | 
|---|
| 1828 | /**************************************************************************** | 
|---|
| 1829 | * log1p | 
|---|
| 1830 | ****************************************************************************/ | 
|---|
| 1831 |  | 
|---|
| 1832 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 1833 | template<class P_numtype1> | 
|---|
| 1834 | inline | 
|---|
| 1835 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1836 | _bz_log1p<P_numtype1> > > | 
|---|
| 1837 | log1p(const Vector<P_numtype1>& d1) | 
|---|
| 1838 | { | 
|---|
| 1839 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1840 | _bz_log1p<P_numtype1> > T_expr; | 
|---|
| 1841 |  | 
|---|
| 1842 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1843 | } | 
|---|
| 1844 |  | 
|---|
| 1845 | template<class P_expr1> | 
|---|
| 1846 | inline | 
|---|
| 1847 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1848 | _bz_log1p<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1849 | log1p(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1850 | { | 
|---|
| 1851 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1852 | _bz_log1p<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1853 |  | 
|---|
| 1854 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1855 | } | 
|---|
| 1856 |  | 
|---|
| 1857 | template<class P_numtype1> | 
|---|
| 1858 | inline | 
|---|
| 1859 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1860 | _bz_log1p<P_numtype1> > > | 
|---|
| 1861 | log1p(const VectorPick<P_numtype1>& d1) | 
|---|
| 1862 | { | 
|---|
| 1863 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1864 | _bz_log1p<P_numtype1> > T_expr; | 
|---|
| 1865 |  | 
|---|
| 1866 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1867 | } | 
|---|
| 1868 |  | 
|---|
| 1869 |  | 
|---|
| 1870 | inline | 
|---|
| 1871 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1872 | _bz_log1p<int> > > | 
|---|
| 1873 | log1p(Range d1) | 
|---|
| 1874 | { | 
|---|
| 1875 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1876 | _bz_log1p<int> > T_expr; | 
|---|
| 1877 |  | 
|---|
| 1878 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1879 | } | 
|---|
| 1880 |  | 
|---|
| 1881 | template<class P_numtype1, int N_length1> | 
|---|
| 1882 | inline | 
|---|
| 1883 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1884 | _bz_log1p<P_numtype1> > > | 
|---|
| 1885 | log1p(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1886 | { | 
|---|
| 1887 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1888 | _bz_log1p<P_numtype1> > T_expr; | 
|---|
| 1889 |  | 
|---|
| 1890 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1891 | } | 
|---|
| 1892 |  | 
|---|
| 1893 | #endif | 
|---|
| 1894 |  | 
|---|
| 1895 | /**************************************************************************** | 
|---|
| 1896 | * log10 | 
|---|
| 1897 | ****************************************************************************/ | 
|---|
| 1898 |  | 
|---|
| 1899 | template<class P_numtype1> | 
|---|
| 1900 | inline | 
|---|
| 1901 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1902 | _bz_log10<P_numtype1> > > | 
|---|
| 1903 | log10(const Vector<P_numtype1>& d1) | 
|---|
| 1904 | { | 
|---|
| 1905 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1906 | _bz_log10<P_numtype1> > T_expr; | 
|---|
| 1907 |  | 
|---|
| 1908 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1909 | } | 
|---|
| 1910 |  | 
|---|
| 1911 | template<class P_expr1> | 
|---|
| 1912 | inline | 
|---|
| 1913 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1914 | _bz_log10<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1915 | log10(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1916 | { | 
|---|
| 1917 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1918 | _bz_log10<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1919 |  | 
|---|
| 1920 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1921 | } | 
|---|
| 1922 |  | 
|---|
| 1923 | template<class P_numtype1> | 
|---|
| 1924 | inline | 
|---|
| 1925 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1926 | _bz_log10<P_numtype1> > > | 
|---|
| 1927 | log10(const VectorPick<P_numtype1>& d1) | 
|---|
| 1928 | { | 
|---|
| 1929 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1930 | _bz_log10<P_numtype1> > T_expr; | 
|---|
| 1931 |  | 
|---|
| 1932 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1933 | } | 
|---|
| 1934 |  | 
|---|
| 1935 |  | 
|---|
| 1936 | inline | 
|---|
| 1937 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 1938 | _bz_log10<int> > > | 
|---|
| 1939 | log10(Range d1) | 
|---|
| 1940 | { | 
|---|
| 1941 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 1942 | _bz_log10<int> > T_expr; | 
|---|
| 1943 |  | 
|---|
| 1944 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1945 | } | 
|---|
| 1946 |  | 
|---|
| 1947 | template<class P_numtype1, int N_length1> | 
|---|
| 1948 | inline | 
|---|
| 1949 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1950 | _bz_log10<P_numtype1> > > | 
|---|
| 1951 | log10(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 1952 | { | 
|---|
| 1953 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 1954 | _bz_log10<P_numtype1> > T_expr; | 
|---|
| 1955 |  | 
|---|
| 1956 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1957 | } | 
|---|
| 1958 |  | 
|---|
| 1959 |  | 
|---|
| 1960 | /**************************************************************************** | 
|---|
| 1961 | * nearest | 
|---|
| 1962 | ****************************************************************************/ | 
|---|
| 1963 |  | 
|---|
| 1964 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 1965 | template<class P_numtype1> | 
|---|
| 1966 | inline | 
|---|
| 1967 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1968 | _bz_nearest<P_numtype1> > > | 
|---|
| 1969 | nearest(const Vector<P_numtype1>& d1) | 
|---|
| 1970 | { | 
|---|
| 1971 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 1972 | _bz_nearest<P_numtype1> > T_expr; | 
|---|
| 1973 |  | 
|---|
| 1974 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1975 | } | 
|---|
| 1976 |  | 
|---|
| 1977 | template<class P_expr1> | 
|---|
| 1978 | inline | 
|---|
| 1979 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1980 | _bz_nearest<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 1981 | nearest(_bz_VecExpr<P_expr1> d1) | 
|---|
| 1982 | { | 
|---|
| 1983 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 1984 | _bz_nearest<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 1985 |  | 
|---|
| 1986 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 1987 | } | 
|---|
| 1988 |  | 
|---|
| 1989 | template<class P_numtype1> | 
|---|
| 1990 | inline | 
|---|
| 1991 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1992 | _bz_nearest<P_numtype1> > > | 
|---|
| 1993 | nearest(const VectorPick<P_numtype1>& d1) | 
|---|
| 1994 | { | 
|---|
| 1995 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 1996 | _bz_nearest<P_numtype1> > T_expr; | 
|---|
| 1997 |  | 
|---|
| 1998 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 1999 | } | 
|---|
| 2000 |  | 
|---|
| 2001 |  | 
|---|
| 2002 | inline | 
|---|
| 2003 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2004 | _bz_nearest<int> > > | 
|---|
| 2005 | nearest(Range d1) | 
|---|
| 2006 | { | 
|---|
| 2007 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2008 | _bz_nearest<int> > T_expr; | 
|---|
| 2009 |  | 
|---|
| 2010 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2011 | } | 
|---|
| 2012 |  | 
|---|
| 2013 | template<class P_numtype1, int N_length1> | 
|---|
| 2014 | inline | 
|---|
| 2015 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2016 | _bz_nearest<P_numtype1> > > | 
|---|
| 2017 | nearest(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2018 | { | 
|---|
| 2019 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2020 | _bz_nearest<P_numtype1> > T_expr; | 
|---|
| 2021 |  | 
|---|
| 2022 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2023 | } | 
|---|
| 2024 |  | 
|---|
| 2025 | #endif | 
|---|
| 2026 |  | 
|---|
| 2027 | /**************************************************************************** | 
|---|
| 2028 | * rint | 
|---|
| 2029 | ****************************************************************************/ | 
|---|
| 2030 |  | 
|---|
| 2031 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 2032 | template<class P_numtype1> | 
|---|
| 2033 | inline | 
|---|
| 2034 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2035 | _bz_rint<P_numtype1> > > | 
|---|
| 2036 | rint(const Vector<P_numtype1>& d1) | 
|---|
| 2037 | { | 
|---|
| 2038 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2039 | _bz_rint<P_numtype1> > T_expr; | 
|---|
| 2040 |  | 
|---|
| 2041 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2042 | } | 
|---|
| 2043 |  | 
|---|
| 2044 | template<class P_expr1> | 
|---|
| 2045 | inline | 
|---|
| 2046 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2047 | _bz_rint<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2048 | rint(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2049 | { | 
|---|
| 2050 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2051 | _bz_rint<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2052 |  | 
|---|
| 2053 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2054 | } | 
|---|
| 2055 |  | 
|---|
| 2056 | template<class P_numtype1> | 
|---|
| 2057 | inline | 
|---|
| 2058 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2059 | _bz_rint<P_numtype1> > > | 
|---|
| 2060 | rint(const VectorPick<P_numtype1>& d1) | 
|---|
| 2061 | { | 
|---|
| 2062 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2063 | _bz_rint<P_numtype1> > T_expr; | 
|---|
| 2064 |  | 
|---|
| 2065 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2066 | } | 
|---|
| 2067 |  | 
|---|
| 2068 |  | 
|---|
| 2069 | inline | 
|---|
| 2070 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2071 | _bz_rint<int> > > | 
|---|
| 2072 | rint(Range d1) | 
|---|
| 2073 | { | 
|---|
| 2074 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2075 | _bz_rint<int> > T_expr; | 
|---|
| 2076 |  | 
|---|
| 2077 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2078 | } | 
|---|
| 2079 |  | 
|---|
| 2080 | template<class P_numtype1, int N_length1> | 
|---|
| 2081 | inline | 
|---|
| 2082 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2083 | _bz_rint<P_numtype1> > > | 
|---|
| 2084 | rint(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2085 | { | 
|---|
| 2086 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2087 | _bz_rint<P_numtype1> > T_expr; | 
|---|
| 2088 |  | 
|---|
| 2089 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2090 | } | 
|---|
| 2091 |  | 
|---|
| 2092 | #endif | 
|---|
| 2093 |  | 
|---|
| 2094 | /**************************************************************************** | 
|---|
| 2095 | * rsqrt | 
|---|
| 2096 | ****************************************************************************/ | 
|---|
| 2097 |  | 
|---|
| 2098 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 2099 | template<class P_numtype1> | 
|---|
| 2100 | inline | 
|---|
| 2101 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2102 | _bz_rsqrt<P_numtype1> > > | 
|---|
| 2103 | rsqrt(const Vector<P_numtype1>& d1) | 
|---|
| 2104 | { | 
|---|
| 2105 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2106 | _bz_rsqrt<P_numtype1> > T_expr; | 
|---|
| 2107 |  | 
|---|
| 2108 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2109 | } | 
|---|
| 2110 |  | 
|---|
| 2111 | template<class P_expr1> | 
|---|
| 2112 | inline | 
|---|
| 2113 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2114 | _bz_rsqrt<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2115 | rsqrt(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2116 | { | 
|---|
| 2117 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2118 | _bz_rsqrt<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2119 |  | 
|---|
| 2120 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2121 | } | 
|---|
| 2122 |  | 
|---|
| 2123 | template<class P_numtype1> | 
|---|
| 2124 | inline | 
|---|
| 2125 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2126 | _bz_rsqrt<P_numtype1> > > | 
|---|
| 2127 | rsqrt(const VectorPick<P_numtype1>& d1) | 
|---|
| 2128 | { | 
|---|
| 2129 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2130 | _bz_rsqrt<P_numtype1> > T_expr; | 
|---|
| 2131 |  | 
|---|
| 2132 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2133 | } | 
|---|
| 2134 |  | 
|---|
| 2135 |  | 
|---|
| 2136 | inline | 
|---|
| 2137 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2138 | _bz_rsqrt<int> > > | 
|---|
| 2139 | rsqrt(Range d1) | 
|---|
| 2140 | { | 
|---|
| 2141 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2142 | _bz_rsqrt<int> > T_expr; | 
|---|
| 2143 |  | 
|---|
| 2144 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2145 | } | 
|---|
| 2146 |  | 
|---|
| 2147 | template<class P_numtype1, int N_length1> | 
|---|
| 2148 | inline | 
|---|
| 2149 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2150 | _bz_rsqrt<P_numtype1> > > | 
|---|
| 2151 | rsqrt(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2152 | { | 
|---|
| 2153 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2154 | _bz_rsqrt<P_numtype1> > T_expr; | 
|---|
| 2155 |  | 
|---|
| 2156 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2157 | } | 
|---|
| 2158 |  | 
|---|
| 2159 | #endif | 
|---|
| 2160 |  | 
|---|
| 2161 | /**************************************************************************** | 
|---|
| 2162 | * sin | 
|---|
| 2163 | ****************************************************************************/ | 
|---|
| 2164 |  | 
|---|
| 2165 | template<class P_numtype1> | 
|---|
| 2166 | inline | 
|---|
| 2167 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2168 | _bz_sin<P_numtype1> > > | 
|---|
| 2169 | sin(const Vector<P_numtype1>& d1) | 
|---|
| 2170 | { | 
|---|
| 2171 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2172 | _bz_sin<P_numtype1> > T_expr; | 
|---|
| 2173 |  | 
|---|
| 2174 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2175 | } | 
|---|
| 2176 |  | 
|---|
| 2177 | template<class P_expr1> | 
|---|
| 2178 | inline | 
|---|
| 2179 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2180 | _bz_sin<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2181 | sin(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2182 | { | 
|---|
| 2183 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2184 | _bz_sin<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2185 |  | 
|---|
| 2186 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2187 | } | 
|---|
| 2188 |  | 
|---|
| 2189 | template<class P_numtype1> | 
|---|
| 2190 | inline | 
|---|
| 2191 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2192 | _bz_sin<P_numtype1> > > | 
|---|
| 2193 | sin(const VectorPick<P_numtype1>& d1) | 
|---|
| 2194 | { | 
|---|
| 2195 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2196 | _bz_sin<P_numtype1> > T_expr; | 
|---|
| 2197 |  | 
|---|
| 2198 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2199 | } | 
|---|
| 2200 |  | 
|---|
| 2201 |  | 
|---|
| 2202 | inline | 
|---|
| 2203 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2204 | _bz_sin<int> > > | 
|---|
| 2205 | sin(Range d1) | 
|---|
| 2206 | { | 
|---|
| 2207 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2208 | _bz_sin<int> > T_expr; | 
|---|
| 2209 |  | 
|---|
| 2210 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2211 | } | 
|---|
| 2212 |  | 
|---|
| 2213 | template<class P_numtype1, int N_length1> | 
|---|
| 2214 | inline | 
|---|
| 2215 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2216 | _bz_sin<P_numtype1> > > | 
|---|
| 2217 | sin(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2218 | { | 
|---|
| 2219 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2220 | _bz_sin<P_numtype1> > T_expr; | 
|---|
| 2221 |  | 
|---|
| 2222 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2223 | } | 
|---|
| 2224 |  | 
|---|
| 2225 |  | 
|---|
| 2226 | /**************************************************************************** | 
|---|
| 2227 | * sinh | 
|---|
| 2228 | ****************************************************************************/ | 
|---|
| 2229 |  | 
|---|
| 2230 | template<class P_numtype1> | 
|---|
| 2231 | inline | 
|---|
| 2232 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2233 | _bz_sinh<P_numtype1> > > | 
|---|
| 2234 | sinh(const Vector<P_numtype1>& d1) | 
|---|
| 2235 | { | 
|---|
| 2236 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2237 | _bz_sinh<P_numtype1> > T_expr; | 
|---|
| 2238 |  | 
|---|
| 2239 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2240 | } | 
|---|
| 2241 |  | 
|---|
| 2242 | template<class P_expr1> | 
|---|
| 2243 | inline | 
|---|
| 2244 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2245 | _bz_sinh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2246 | sinh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2247 | { | 
|---|
| 2248 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2249 | _bz_sinh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2250 |  | 
|---|
| 2251 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2252 | } | 
|---|
| 2253 |  | 
|---|
| 2254 | template<class P_numtype1> | 
|---|
| 2255 | inline | 
|---|
| 2256 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2257 | _bz_sinh<P_numtype1> > > | 
|---|
| 2258 | sinh(const VectorPick<P_numtype1>& d1) | 
|---|
| 2259 | { | 
|---|
| 2260 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2261 | _bz_sinh<P_numtype1> > T_expr; | 
|---|
| 2262 |  | 
|---|
| 2263 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2264 | } | 
|---|
| 2265 |  | 
|---|
| 2266 |  | 
|---|
| 2267 | inline | 
|---|
| 2268 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2269 | _bz_sinh<int> > > | 
|---|
| 2270 | sinh(Range d1) | 
|---|
| 2271 | { | 
|---|
| 2272 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2273 | _bz_sinh<int> > T_expr; | 
|---|
| 2274 |  | 
|---|
| 2275 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2276 | } | 
|---|
| 2277 |  | 
|---|
| 2278 | template<class P_numtype1, int N_length1> | 
|---|
| 2279 | inline | 
|---|
| 2280 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2281 | _bz_sinh<P_numtype1> > > | 
|---|
| 2282 | sinh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2283 | { | 
|---|
| 2284 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2285 | _bz_sinh<P_numtype1> > T_expr; | 
|---|
| 2286 |  | 
|---|
| 2287 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2288 | } | 
|---|
| 2289 |  | 
|---|
| 2290 |  | 
|---|
| 2291 | /**************************************************************************** | 
|---|
| 2292 | * sqr | 
|---|
| 2293 | ****************************************************************************/ | 
|---|
| 2294 |  | 
|---|
| 2295 | template<class P_numtype1> | 
|---|
| 2296 | inline | 
|---|
| 2297 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2298 | _bz_sqr<P_numtype1> > > | 
|---|
| 2299 | sqr(const Vector<P_numtype1>& d1) | 
|---|
| 2300 | { | 
|---|
| 2301 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2302 | _bz_sqr<P_numtype1> > T_expr; | 
|---|
| 2303 |  | 
|---|
| 2304 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2305 | } | 
|---|
| 2306 |  | 
|---|
| 2307 | template<class P_expr1> | 
|---|
| 2308 | inline | 
|---|
| 2309 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2310 | _bz_sqr<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2311 | sqr(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2312 | { | 
|---|
| 2313 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2314 | _bz_sqr<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2315 |  | 
|---|
| 2316 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2317 | } | 
|---|
| 2318 |  | 
|---|
| 2319 | template<class P_numtype1> | 
|---|
| 2320 | inline | 
|---|
| 2321 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2322 | _bz_sqr<P_numtype1> > > | 
|---|
| 2323 | sqr(const VectorPick<P_numtype1>& d1) | 
|---|
| 2324 | { | 
|---|
| 2325 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2326 | _bz_sqr<P_numtype1> > T_expr; | 
|---|
| 2327 |  | 
|---|
| 2328 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2329 | } | 
|---|
| 2330 |  | 
|---|
| 2331 |  | 
|---|
| 2332 | inline | 
|---|
| 2333 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2334 | _bz_sqr<int> > > | 
|---|
| 2335 | sqr(Range d1) | 
|---|
| 2336 | { | 
|---|
| 2337 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2338 | _bz_sqr<int> > T_expr; | 
|---|
| 2339 |  | 
|---|
| 2340 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2341 | } | 
|---|
| 2342 |  | 
|---|
| 2343 | template<class P_numtype1, int N_length1> | 
|---|
| 2344 | inline | 
|---|
| 2345 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2346 | _bz_sqr<P_numtype1> > > | 
|---|
| 2347 | sqr(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2348 | { | 
|---|
| 2349 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2350 | _bz_sqr<P_numtype1> > T_expr; | 
|---|
| 2351 |  | 
|---|
| 2352 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2353 | } | 
|---|
| 2354 |  | 
|---|
| 2355 |  | 
|---|
| 2356 | /**************************************************************************** | 
|---|
| 2357 | * sqrt | 
|---|
| 2358 | ****************************************************************************/ | 
|---|
| 2359 |  | 
|---|
| 2360 | template<class P_numtype1> | 
|---|
| 2361 | inline | 
|---|
| 2362 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2363 | _bz_sqrt<P_numtype1> > > | 
|---|
| 2364 | sqrt(const Vector<P_numtype1>& d1) | 
|---|
| 2365 | { | 
|---|
| 2366 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2367 | _bz_sqrt<P_numtype1> > T_expr; | 
|---|
| 2368 |  | 
|---|
| 2369 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2370 | } | 
|---|
| 2371 |  | 
|---|
| 2372 | template<class P_expr1> | 
|---|
| 2373 | inline | 
|---|
| 2374 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2375 | _bz_sqrt<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2376 | sqrt(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2377 | { | 
|---|
| 2378 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2379 | _bz_sqrt<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2380 |  | 
|---|
| 2381 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2382 | } | 
|---|
| 2383 |  | 
|---|
| 2384 | template<class P_numtype1> | 
|---|
| 2385 | inline | 
|---|
| 2386 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2387 | _bz_sqrt<P_numtype1> > > | 
|---|
| 2388 | sqrt(const VectorPick<P_numtype1>& d1) | 
|---|
| 2389 | { | 
|---|
| 2390 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2391 | _bz_sqrt<P_numtype1> > T_expr; | 
|---|
| 2392 |  | 
|---|
| 2393 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2394 | } | 
|---|
| 2395 |  | 
|---|
| 2396 |  | 
|---|
| 2397 | inline | 
|---|
| 2398 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2399 | _bz_sqrt<int> > > | 
|---|
| 2400 | sqrt(Range d1) | 
|---|
| 2401 | { | 
|---|
| 2402 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2403 | _bz_sqrt<int> > T_expr; | 
|---|
| 2404 |  | 
|---|
| 2405 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2406 | } | 
|---|
| 2407 |  | 
|---|
| 2408 | template<class P_numtype1, int N_length1> | 
|---|
| 2409 | inline | 
|---|
| 2410 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2411 | _bz_sqrt<P_numtype1> > > | 
|---|
| 2412 | sqrt(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2413 | { | 
|---|
| 2414 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2415 | _bz_sqrt<P_numtype1> > T_expr; | 
|---|
| 2416 |  | 
|---|
| 2417 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2418 | } | 
|---|
| 2419 |  | 
|---|
| 2420 |  | 
|---|
| 2421 | /**************************************************************************** | 
|---|
| 2422 | * tan | 
|---|
| 2423 | ****************************************************************************/ | 
|---|
| 2424 |  | 
|---|
| 2425 | template<class P_numtype1> | 
|---|
| 2426 | inline | 
|---|
| 2427 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2428 | _bz_tan<P_numtype1> > > | 
|---|
| 2429 | tan(const Vector<P_numtype1>& d1) | 
|---|
| 2430 | { | 
|---|
| 2431 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2432 | _bz_tan<P_numtype1> > T_expr; | 
|---|
| 2433 |  | 
|---|
| 2434 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2435 | } | 
|---|
| 2436 |  | 
|---|
| 2437 | template<class P_expr1> | 
|---|
| 2438 | inline | 
|---|
| 2439 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2440 | _bz_tan<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2441 | tan(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2442 | { | 
|---|
| 2443 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2444 | _bz_tan<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2445 |  | 
|---|
| 2446 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2447 | } | 
|---|
| 2448 |  | 
|---|
| 2449 | template<class P_numtype1> | 
|---|
| 2450 | inline | 
|---|
| 2451 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2452 | _bz_tan<P_numtype1> > > | 
|---|
| 2453 | tan(const VectorPick<P_numtype1>& d1) | 
|---|
| 2454 | { | 
|---|
| 2455 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2456 | _bz_tan<P_numtype1> > T_expr; | 
|---|
| 2457 |  | 
|---|
| 2458 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2459 | } | 
|---|
| 2460 |  | 
|---|
| 2461 |  | 
|---|
| 2462 | inline | 
|---|
| 2463 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2464 | _bz_tan<int> > > | 
|---|
| 2465 | tan(Range d1) | 
|---|
| 2466 | { | 
|---|
| 2467 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2468 | _bz_tan<int> > T_expr; | 
|---|
| 2469 |  | 
|---|
| 2470 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2471 | } | 
|---|
| 2472 |  | 
|---|
| 2473 | template<class P_numtype1, int N_length1> | 
|---|
| 2474 | inline | 
|---|
| 2475 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2476 | _bz_tan<P_numtype1> > > | 
|---|
| 2477 | tan(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2478 | { | 
|---|
| 2479 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2480 | _bz_tan<P_numtype1> > T_expr; | 
|---|
| 2481 |  | 
|---|
| 2482 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2483 | } | 
|---|
| 2484 |  | 
|---|
| 2485 |  | 
|---|
| 2486 | /**************************************************************************** | 
|---|
| 2487 | * tanh | 
|---|
| 2488 | ****************************************************************************/ | 
|---|
| 2489 |  | 
|---|
| 2490 | template<class P_numtype1> | 
|---|
| 2491 | inline | 
|---|
| 2492 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2493 | _bz_tanh<P_numtype1> > > | 
|---|
| 2494 | tanh(const Vector<P_numtype1>& d1) | 
|---|
| 2495 | { | 
|---|
| 2496 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2497 | _bz_tanh<P_numtype1> > T_expr; | 
|---|
| 2498 |  | 
|---|
| 2499 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2500 | } | 
|---|
| 2501 |  | 
|---|
| 2502 | template<class P_expr1> | 
|---|
| 2503 | inline | 
|---|
| 2504 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2505 | _bz_tanh<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2506 | tanh(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2507 | { | 
|---|
| 2508 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2509 | _bz_tanh<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2510 |  | 
|---|
| 2511 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2512 | } | 
|---|
| 2513 |  | 
|---|
| 2514 | template<class P_numtype1> | 
|---|
| 2515 | inline | 
|---|
| 2516 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2517 | _bz_tanh<P_numtype1> > > | 
|---|
| 2518 | tanh(const VectorPick<P_numtype1>& d1) | 
|---|
| 2519 | { | 
|---|
| 2520 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2521 | _bz_tanh<P_numtype1> > T_expr; | 
|---|
| 2522 |  | 
|---|
| 2523 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2524 | } | 
|---|
| 2525 |  | 
|---|
| 2526 |  | 
|---|
| 2527 | inline | 
|---|
| 2528 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2529 | _bz_tanh<int> > > | 
|---|
| 2530 | tanh(Range d1) | 
|---|
| 2531 | { | 
|---|
| 2532 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2533 | _bz_tanh<int> > T_expr; | 
|---|
| 2534 |  | 
|---|
| 2535 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2536 | } | 
|---|
| 2537 |  | 
|---|
| 2538 | template<class P_numtype1, int N_length1> | 
|---|
| 2539 | inline | 
|---|
| 2540 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2541 | _bz_tanh<P_numtype1> > > | 
|---|
| 2542 | tanh(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2543 | { | 
|---|
| 2544 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2545 | _bz_tanh<P_numtype1> > T_expr; | 
|---|
| 2546 |  | 
|---|
| 2547 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2548 | } | 
|---|
| 2549 |  | 
|---|
| 2550 |  | 
|---|
| 2551 | /**************************************************************************** | 
|---|
| 2552 | * trunc | 
|---|
| 2553 | ****************************************************************************/ | 
|---|
| 2554 |  | 
|---|
| 2555 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 2556 | template<class P_numtype1> | 
|---|
| 2557 | inline | 
|---|
| 2558 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2559 | _bz_trunc<P_numtype1> > > | 
|---|
| 2560 | trunc(const Vector<P_numtype1>& d1) | 
|---|
| 2561 | { | 
|---|
| 2562 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2563 | _bz_trunc<P_numtype1> > T_expr; | 
|---|
| 2564 |  | 
|---|
| 2565 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2566 | } | 
|---|
| 2567 |  | 
|---|
| 2568 | template<class P_expr1> | 
|---|
| 2569 | inline | 
|---|
| 2570 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2571 | _bz_trunc<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2572 | trunc(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2573 | { | 
|---|
| 2574 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2575 | _bz_trunc<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2576 |  | 
|---|
| 2577 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2578 | } | 
|---|
| 2579 |  | 
|---|
| 2580 | template<class P_numtype1> | 
|---|
| 2581 | inline | 
|---|
| 2582 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2583 | _bz_trunc<P_numtype1> > > | 
|---|
| 2584 | trunc(const VectorPick<P_numtype1>& d1) | 
|---|
| 2585 | { | 
|---|
| 2586 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2587 | _bz_trunc<P_numtype1> > T_expr; | 
|---|
| 2588 |  | 
|---|
| 2589 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2590 | } | 
|---|
| 2591 |  | 
|---|
| 2592 |  | 
|---|
| 2593 | inline | 
|---|
| 2594 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2595 | _bz_trunc<int> > > | 
|---|
| 2596 | trunc(Range d1) | 
|---|
| 2597 | { | 
|---|
| 2598 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2599 | _bz_trunc<int> > T_expr; | 
|---|
| 2600 |  | 
|---|
| 2601 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2602 | } | 
|---|
| 2603 |  | 
|---|
| 2604 | template<class P_numtype1, int N_length1> | 
|---|
| 2605 | inline | 
|---|
| 2606 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2607 | _bz_trunc<P_numtype1> > > | 
|---|
| 2608 | trunc(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2609 | { | 
|---|
| 2610 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2611 | _bz_trunc<P_numtype1> > T_expr; | 
|---|
| 2612 |  | 
|---|
| 2613 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2614 | } | 
|---|
| 2615 |  | 
|---|
| 2616 | #endif | 
|---|
| 2617 |  | 
|---|
| 2618 | /**************************************************************************** | 
|---|
| 2619 | * uitrunc | 
|---|
| 2620 | ****************************************************************************/ | 
|---|
| 2621 |  | 
|---|
| 2622 | #ifdef BZ_HAVE_SYSV_MATH | 
|---|
| 2623 | template<class P_numtype1> | 
|---|
| 2624 | inline | 
|---|
| 2625 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2626 | _bz_uitrunc<P_numtype1> > > | 
|---|
| 2627 | uitrunc(const Vector<P_numtype1>& d1) | 
|---|
| 2628 | { | 
|---|
| 2629 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2630 | _bz_uitrunc<P_numtype1> > T_expr; | 
|---|
| 2631 |  | 
|---|
| 2632 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2633 | } | 
|---|
| 2634 |  | 
|---|
| 2635 | template<class P_expr1> | 
|---|
| 2636 | inline | 
|---|
| 2637 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2638 | _bz_uitrunc<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2639 | uitrunc(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2640 | { | 
|---|
| 2641 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2642 | _bz_uitrunc<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2643 |  | 
|---|
| 2644 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2645 | } | 
|---|
| 2646 |  | 
|---|
| 2647 | template<class P_numtype1> | 
|---|
| 2648 | inline | 
|---|
| 2649 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2650 | _bz_uitrunc<P_numtype1> > > | 
|---|
| 2651 | uitrunc(const VectorPick<P_numtype1>& d1) | 
|---|
| 2652 | { | 
|---|
| 2653 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2654 | _bz_uitrunc<P_numtype1> > T_expr; | 
|---|
| 2655 |  | 
|---|
| 2656 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2657 | } | 
|---|
| 2658 |  | 
|---|
| 2659 |  | 
|---|
| 2660 | inline | 
|---|
| 2661 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2662 | _bz_uitrunc<int> > > | 
|---|
| 2663 | uitrunc(Range d1) | 
|---|
| 2664 | { | 
|---|
| 2665 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2666 | _bz_uitrunc<int> > T_expr; | 
|---|
| 2667 |  | 
|---|
| 2668 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2669 | } | 
|---|
| 2670 |  | 
|---|
| 2671 | template<class P_numtype1, int N_length1> | 
|---|
| 2672 | inline | 
|---|
| 2673 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2674 | _bz_uitrunc<P_numtype1> > > | 
|---|
| 2675 | uitrunc(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2676 | { | 
|---|
| 2677 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2678 | _bz_uitrunc<P_numtype1> > T_expr; | 
|---|
| 2679 |  | 
|---|
| 2680 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2681 | } | 
|---|
| 2682 |  | 
|---|
| 2683 | #endif | 
|---|
| 2684 |  | 
|---|
| 2685 | /**************************************************************************** | 
|---|
| 2686 | * y0 | 
|---|
| 2687 | ****************************************************************************/ | 
|---|
| 2688 |  | 
|---|
| 2689 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 2690 | template<class P_numtype1> | 
|---|
| 2691 | inline | 
|---|
| 2692 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2693 | _bz_y0<P_numtype1> > > | 
|---|
| 2694 | y0(const Vector<P_numtype1>& d1) | 
|---|
| 2695 | { | 
|---|
| 2696 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2697 | _bz_y0<P_numtype1> > T_expr; | 
|---|
| 2698 |  | 
|---|
| 2699 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2700 | } | 
|---|
| 2701 |  | 
|---|
| 2702 | template<class P_expr1> | 
|---|
| 2703 | inline | 
|---|
| 2704 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2705 | _bz_y0<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2706 | y0(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2707 | { | 
|---|
| 2708 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2709 | _bz_y0<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2710 |  | 
|---|
| 2711 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2712 | } | 
|---|
| 2713 |  | 
|---|
| 2714 | template<class P_numtype1> | 
|---|
| 2715 | inline | 
|---|
| 2716 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2717 | _bz_y0<P_numtype1> > > | 
|---|
| 2718 | y0(const VectorPick<P_numtype1>& d1) | 
|---|
| 2719 | { | 
|---|
| 2720 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2721 | _bz_y0<P_numtype1> > T_expr; | 
|---|
| 2722 |  | 
|---|
| 2723 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2724 | } | 
|---|
| 2725 |  | 
|---|
| 2726 |  | 
|---|
| 2727 | inline | 
|---|
| 2728 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2729 | _bz_y0<int> > > | 
|---|
| 2730 | y0(Range d1) | 
|---|
| 2731 | { | 
|---|
| 2732 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2733 | _bz_y0<int> > T_expr; | 
|---|
| 2734 |  | 
|---|
| 2735 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2736 | } | 
|---|
| 2737 |  | 
|---|
| 2738 | template<class P_numtype1, int N_length1> | 
|---|
| 2739 | inline | 
|---|
| 2740 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2741 | _bz_y0<P_numtype1> > > | 
|---|
| 2742 | y0(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2743 | { | 
|---|
| 2744 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2745 | _bz_y0<P_numtype1> > T_expr; | 
|---|
| 2746 |  | 
|---|
| 2747 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2748 | } | 
|---|
| 2749 |  | 
|---|
| 2750 | #endif | 
|---|
| 2751 |  | 
|---|
| 2752 | /**************************************************************************** | 
|---|
| 2753 | * y1 | 
|---|
| 2754 | ****************************************************************************/ | 
|---|
| 2755 |  | 
|---|
| 2756 | #ifdef BZ_HAVE_IEEE_MATH | 
|---|
| 2757 | template<class P_numtype1> | 
|---|
| 2758 | inline | 
|---|
| 2759 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2760 | _bz_y1<P_numtype1> > > | 
|---|
| 2761 | y1(const Vector<P_numtype1>& d1) | 
|---|
| 2762 | { | 
|---|
| 2763 | typedef _bz_VecExprUnaryOp<VectorIterConst<P_numtype1>, | 
|---|
| 2764 | _bz_y1<P_numtype1> > T_expr; | 
|---|
| 2765 |  | 
|---|
| 2766 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2767 | } | 
|---|
| 2768 |  | 
|---|
| 2769 | template<class P_expr1> | 
|---|
| 2770 | inline | 
|---|
| 2771 | _bz_VecExpr<_bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2772 | _bz_y1<_bz_typename P_expr1::T_numtype> > > | 
|---|
| 2773 | y1(_bz_VecExpr<P_expr1> d1) | 
|---|
| 2774 | { | 
|---|
| 2775 | typedef _bz_VecExprUnaryOp<_bz_VecExpr<P_expr1>, | 
|---|
| 2776 | _bz_y1<_bz_typename P_expr1::T_numtype> > T_expr; | 
|---|
| 2777 |  | 
|---|
| 2778 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2779 | } | 
|---|
| 2780 |  | 
|---|
| 2781 | template<class P_numtype1> | 
|---|
| 2782 | inline | 
|---|
| 2783 | _bz_VecExpr<_bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2784 | _bz_y1<P_numtype1> > > | 
|---|
| 2785 | y1(const VectorPick<P_numtype1>& d1) | 
|---|
| 2786 | { | 
|---|
| 2787 | typedef _bz_VecExprUnaryOp<VectorPickIterConst<P_numtype1>, | 
|---|
| 2788 | _bz_y1<P_numtype1> > T_expr; | 
|---|
| 2789 |  | 
|---|
| 2790 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2791 | } | 
|---|
| 2792 |  | 
|---|
| 2793 |  | 
|---|
| 2794 | inline | 
|---|
| 2795 | _bz_VecExpr<_bz_VecExprUnaryOp<Range, | 
|---|
| 2796 | _bz_y1<int> > > | 
|---|
| 2797 | y1(Range d1) | 
|---|
| 2798 | { | 
|---|
| 2799 | typedef _bz_VecExprUnaryOp<Range, | 
|---|
| 2800 | _bz_y1<int> > T_expr; | 
|---|
| 2801 |  | 
|---|
| 2802 | return _bz_VecExpr<T_expr>(T_expr(d1)); | 
|---|
| 2803 | } | 
|---|
| 2804 |  | 
|---|
| 2805 | template<class P_numtype1, int N_length1> | 
|---|
| 2806 | inline | 
|---|
| 2807 | _bz_VecExpr<_bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2808 | _bz_y1<P_numtype1> > > | 
|---|
| 2809 | y1(const TinyVector<P_numtype1, N_length1>& d1) | 
|---|
| 2810 | { | 
|---|
| 2811 | typedef _bz_VecExprUnaryOp<TinyVectorIterConst<P_numtype1, N_length1>, | 
|---|
| 2812 | _bz_y1<P_numtype1> > T_expr; | 
|---|
| 2813 |  | 
|---|
| 2814 | return _bz_VecExpr<T_expr>(T_expr(d1.begin())); | 
|---|
| 2815 | } | 
|---|
| 2816 |  | 
|---|
| 2817 | #endif | 
|---|
| 2818 |  | 
|---|
| 2819 | BZ_NAMESPACE_END | 
|---|
| 2820 |  | 
|---|
| 2821 | #endif | 
|---|