Skip to content

Commit 274c983

Browse files
committed
ditto
1 parent 83328fd commit 274c983

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/mir/math/sum.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,19 +1830,19 @@ version(X86_Any)
18301830
unittest
18311831
{
18321832
import core.simd;
1833-
import mir.ndslice.topology: iota;
1833+
import mir.ndslice.topology: iota, as;
18341834

18351835
alias S = Summation;
18361836
alias sums = AliasSeq!(S.kahan, S.pairwise, S.naive, S.fast, S.precise,
18371837
S.kbn, S.kb2);
18381838

1839-
double[] ns = [9.0, 101.0];
1839+
int[2] ns = [9, 101];
18401840

18411841
foreach (n; ns)
18421842
{
18431843
foreach (sumType; sums)
18441844
{
1845-
auto ar = iota(n);
1845+
auto ar = iota(n).as!double;
18461846
double c = n * (n - 1) / 2; // gauss for n=100
18471847
double s = ar.sum!(sumType);
18481848
assert(s == c);

0 commit comments

Comments
 (0)