Ignore:
Timestamp:
12/07/18 19:51:23 (12 months ago)
Author:
gkronber
Message:

#2915: added abs, cube, cuberoot, aq to native interpreter (does not produce exactly the same results as the BatchInterpreter)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h

    r16274 r16349  
    5353inline void inv(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = 1. / b[i]; }
    5454inline void neg(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = -b[i]; }
     55inline void abs(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = std::abs(b[i]); }
     56inline void analytical_quotient(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] /= hl_sqrt(b[i]*b[i] + 1.); }
    5557
    5658// vector - scalar operations
     
    6062inline void mul(double* __restrict a, double s) noexcept { FOR(i) a[i] *= s; }
    6163inline void div(double* __restrict a, double s) noexcept { FOR(i) a[i] /= s; }
     64inline void pow(double* __restrict dst, double const * __restrict src, double s) noexcept { FOR(i) dst[i] = hl_pow(src[i], s); }
    6265
    6366// vector operations
Note: See TracChangeset for help on using the changeset viewer.