File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 1- /**
1+ /+ +
22This module contains summation algorithms.
33
44License: $(LINK2 http://boost.org/LICENSE_1_0.txt, Boost License 1.0).
55
66Authors: Ilya Yaroshenko
77
88Copyright: Copyright © 2015-, Ilya Yaroshenko
9- * /
9+ + /
1010module mir.math.sum ;
1111
1212// /
Original file line number Diff line number Diff line change @@ -156,19 +156,14 @@ unittest
156156 import mir.ndslice.topology : as, iota;
157157 import mir.ndslice.internal : fastmath;
158158
159- static @fastmath T fmuladd(T)(const T a, const T b, const T c)
160- {
161- return a + b * c;
162- }
163-
164159 // | 0 1 2 |
165160 // | 3 4 5 |
166161 auto a = iota([2 , 3 ], 0 ).as! double .slice;
167162 // | 1 2 3 |
168163 // | 4 5 6 |
169164 auto b = iota([2 , 3 ], 1 ).as! double .slice;
170165
171- alias dot = reduce! fmuladd ;
166+ alias dot = reduce! " a + b * c " ;
172167 auto res = dot(0.0 , a, b);
173168
174169 // check the result:
You can’t perform that action at this time.
0 commit comments