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