Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16351


Ignore:
Timestamp:
12/08/18 07:43:41 (6 years ago)
Author:
gkronber
Message:

#2915: fixed compile error after merge and made another change to native interpreter trying to resolve the differences when using abs and sqrt(). No success

Location:
branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1
Files:
4 edited

Legend:

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

    r16350 r16351  
    101101                    break;
    102102                }
     103            case OpCodes::Sqrt:
     104                {
     105                    in.value = std::pow(code[in.childIndex].value, 1./2.);
     106                    break;
     107                }
    103108            case OpCodes::Square:
    104109                {
     
    106111                    break;
    107112                }
    108             case OpCodes::Sqrt:
    109                 {
    110                     in.value = std::sqrt(code[in.childIndex].value);
    111                     break;
    112                 }
    113             case OpCodes::Square:
    114                 {
    115                     in.value = std::pow(code[in.childIndex].value, 2.);
    116                     break;
    117                 }
    118113            case OpCodes::CubeRoot:
    119114                {
     
    128123            case OpCodes::Absolute:
    129124                {
    130                     in.value = std::abs(code[in.childIndex].value);
     125                    in.value = std::fabs(code[in.childIndex].value);
    131126                    break;
    132127                }
     
    262257            case OpCodes::Sqrt:
    263258                {
    264                     sqrt(in.buf, code[in.childIndex].buf);
     259                    pow(in.buf, code[in.childIndex].buf, 1./2.);
    265260                    break;
    266261                }
  • branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h

    r16349 r16351  
    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]; }
    55 inline void abs(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = std::abs(b[i]); }
     55inline void abs(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = std::fabs(b[i]); }
    5656inline void analytical_quotient(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] /= hl_sqrt(b[i]*b[i] + 1.); }
    5757
     
    7171inline void sin(double* __restrict a) noexcept { FOR(i) a[i] = hl_sin(a[i]); }
    7272inline void cos(double* __restrict a) noexcept { FOR(i) a[i] = hl_cos(a[i]); }
    73 inline void sqrt(double* __restrict a) noexcept { FOR(i) a[i] = hl_sqrt(a[i]); }
    7473inline void round(double* __restrict a) noexcept { FOR(i) a[i] = hl_round(a[i]); }
    7574inline void square(double* __restrict a) noexcept { FOR(i) a[i] = hl_pow(a[i], 2.); }
Note: See TracChangeset for help on using the changeset viewer.