Changeset 17072 for stable/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h
- Timestamp:
- 07/04/19 16:07:49 (5 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.ExtLibs
- Property svn:mergeinfo changed
/branches/2915-AbsoluteSymbol/HeuristicLab.ExtLibs (added) merged: 16240,16332,16349-16351 /trunk/HeuristicLab.ExtLibs merged: 16356
- Property svn:mergeinfo changed
-
stable/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/src/vector_operations.h
r17071 r17072 53 53 inline void inv(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] = 1. / b[i]; } 54 54 inline 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::fabs(b[i]); } 56 inline void analytical_quotient(double* __restrict a, double const * __restrict b) noexcept { FOR(i) a[i] /= hl_sqrt(b[i]*b[i] + 1.); } 55 57 56 58 // vector - scalar operations … … 60 62 inline void mul(double* __restrict a, double s) noexcept { FOR(i) a[i] *= s; } 61 63 inline void div(double* __restrict a, double s) noexcept { FOR(i) a[i] /= s; } 64 inline void pow(double* __restrict dst, double const * __restrict src, double s) noexcept { FOR(i) dst[i] = hl_pow(src[i], s); } 62 65 63 66 // vector operations … … 68 71 inline void sin(double* __restrict a) noexcept { FOR(i) a[i] = hl_sin(a[i]); } 69 72 inline void cos(double* __restrict a) noexcept { FOR(i) a[i] = hl_cos(a[i]); } 70 inline void sqrt(double* __restrict a) noexcept { FOR(i) a[i] = hl_sqrt(a[i]); }71 73 inline void round(double* __restrict a) noexcept { FOR(i) a[i] = hl_round(a[i]); } 72 74 inline 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.