1 // Code generated by "go run github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go"; DO NOT EDIT.
3 // Copyright 2014 The Gonum Authors. All rights reserved.
4 // Use of this code is governed by a BSD-style
5 // license that can be found in the LICENSE file
12 "golang.org/x/exp/rand"
14 "gonum.org/v1/gonum/blas"
28 func randomSlice(l, idx int) []float64 {
32 s := make([]float64, l*idx)
39 func benchmarkDdot(b *testing.B, n int, x []float64, incX int, y []float64, incY int) {
41 for i := 0; i < b.N; i++ {
42 impl.Ddot(n, x, incX, y, incY)
46 func BenchmarkDdotSmallBothUnitary(b *testing.B) {
49 x := randomSlice(n, incX)
51 y := randomSlice(n, incY)
53 benchmarkDdot(b, n, x, incX, y, incY)
56 func BenchmarkDdotSmallIncUni(b *testing.B) {
59 x := randomSlice(n, incX)
61 y := randomSlice(n, incY)
63 benchmarkDdot(b, n, x, incX, y, incY)
66 func BenchmarkDdotSmallUniInc(b *testing.B) {
69 x := randomSlice(n, incX)
71 y := randomSlice(n, incY)
73 benchmarkDdot(b, n, x, incX, y, incY)
76 func BenchmarkDdotSmallBothInc(b *testing.B) {
79 x := randomSlice(n, incX)
81 y := randomSlice(n, incY)
83 benchmarkDdot(b, n, x, incX, y, incY)
86 func BenchmarkDdotMediumBothUnitary(b *testing.B) {
89 x := randomSlice(n, incX)
91 y := randomSlice(n, incY)
93 benchmarkDdot(b, n, x, incX, y, incY)
96 func BenchmarkDdotMediumIncUni(b *testing.B) {
99 x := randomSlice(n, incX)
101 y := randomSlice(n, incY)
103 benchmarkDdot(b, n, x, incX, y, incY)
106 func BenchmarkDdotMediumUniInc(b *testing.B) {
109 x := randomSlice(n, incX)
111 y := randomSlice(n, incY)
113 benchmarkDdot(b, n, x, incX, y, incY)
116 func BenchmarkDdotMediumBothInc(b *testing.B) {
119 x := randomSlice(n, incX)
121 y := randomSlice(n, incY)
123 benchmarkDdot(b, n, x, incX, y, incY)
126 func BenchmarkDdotLargeBothUnitary(b *testing.B) {
129 x := randomSlice(n, incX)
131 y := randomSlice(n, incY)
133 benchmarkDdot(b, n, x, incX, y, incY)
136 func BenchmarkDdotLargeIncUni(b *testing.B) {
139 x := randomSlice(n, incX)
141 y := randomSlice(n, incY)
143 benchmarkDdot(b, n, x, incX, y, incY)
146 func BenchmarkDdotLargeUniInc(b *testing.B) {
149 x := randomSlice(n, incX)
151 y := randomSlice(n, incY)
153 benchmarkDdot(b, n, x, incX, y, incY)
156 func BenchmarkDdotLargeBothInc(b *testing.B) {
159 x := randomSlice(n, incX)
161 y := randomSlice(n, incY)
163 benchmarkDdot(b, n, x, incX, y, incY)
166 func BenchmarkDdotHugeBothUnitary(b *testing.B) {
169 x := randomSlice(n, incX)
171 y := randomSlice(n, incY)
173 benchmarkDdot(b, n, x, incX, y, incY)
176 func BenchmarkDdotHugeIncUni(b *testing.B) {
179 x := randomSlice(n, incX)
181 y := randomSlice(n, incY)
183 benchmarkDdot(b, n, x, incX, y, incY)
186 func BenchmarkDdotHugeUniInc(b *testing.B) {
189 x := randomSlice(n, incX)
191 y := randomSlice(n, incY)
193 benchmarkDdot(b, n, x, incX, y, incY)
196 func BenchmarkDdotHugeBothInc(b *testing.B) {
199 x := randomSlice(n, incX)
201 y := randomSlice(n, incY)
203 benchmarkDdot(b, n, x, incX, y, incY)
206 /* ------------------ */
207 func benchmarkDnrm2(b *testing.B, n int, x []float64, incX int) {
209 for i := 0; i < b.N; i++ {
210 impl.Dnrm2(n, x, incX)
214 func BenchmarkDnrm2SmallUnitaryInc(b *testing.B) {
217 x := randomSlice(n, incX)
219 benchmarkDnrm2(b, n, x, incX)
222 func BenchmarkDnrm2SmallPosInc(b *testing.B) {
225 x := randomSlice(n, incX)
227 benchmarkDnrm2(b, n, x, incX)
230 func BenchmarkDnrm2MediumUnitaryInc(b *testing.B) {
233 x := randomSlice(n, incX)
235 benchmarkDnrm2(b, n, x, incX)
238 func BenchmarkDnrm2MediumPosInc(b *testing.B) {
241 x := randomSlice(n, incX)
243 benchmarkDnrm2(b, n, x, incX)
246 func BenchmarkDnrm2LargeUnitaryInc(b *testing.B) {
249 x := randomSlice(n, incX)
251 benchmarkDnrm2(b, n, x, incX)
254 func BenchmarkDnrm2LargePosInc(b *testing.B) {
257 x := randomSlice(n, incX)
259 benchmarkDnrm2(b, n, x, incX)
262 func BenchmarkDnrm2HugeUnitaryInc(b *testing.B) {
265 x := randomSlice(n, incX)
267 benchmarkDnrm2(b, n, x, incX)
270 func BenchmarkDnrm2HugePosInc(b *testing.B) {
273 x := randomSlice(n, incX)
275 benchmarkDnrm2(b, n, x, incX)
278 /* ------------------ */
279 func benchmarkDasum(b *testing.B, n int, x []float64, incX int) {
281 for i := 0; i < b.N; i++ {
282 impl.Dasum(n, x, incX)
286 func BenchmarkDasumSmallUnitaryInc(b *testing.B) {
289 x := randomSlice(n, incX)
291 benchmarkDasum(b, n, x, incX)
294 func BenchmarkDasumSmallPosInc(b *testing.B) {
297 x := randomSlice(n, incX)
299 benchmarkDasum(b, n, x, incX)
302 func BenchmarkDasumMediumUnitaryInc(b *testing.B) {
305 x := randomSlice(n, incX)
307 benchmarkDasum(b, n, x, incX)
310 func BenchmarkDasumMediumPosInc(b *testing.B) {
313 x := randomSlice(n, incX)
315 benchmarkDasum(b, n, x, incX)
318 func BenchmarkDasumLargeUnitaryInc(b *testing.B) {
321 x := randomSlice(n, incX)
323 benchmarkDasum(b, n, x, incX)
326 func BenchmarkDasumLargePosInc(b *testing.B) {
329 x := randomSlice(n, incX)
331 benchmarkDasum(b, n, x, incX)
334 func BenchmarkDasumHugeUnitaryInc(b *testing.B) {
337 x := randomSlice(n, incX)
339 benchmarkDasum(b, n, x, incX)
342 func BenchmarkDasumHugePosInc(b *testing.B) {
345 x := randomSlice(n, incX)
347 benchmarkDasum(b, n, x, incX)
350 /* ------------------ */
351 func benchmarkIdamax(b *testing.B, n int, x []float64, incX int) {
353 for i := 0; i < b.N; i++ {
354 impl.Idamax(n, x, incX)
358 func BenchmarkIdamaxSmallUnitaryInc(b *testing.B) {
361 x := randomSlice(n, incX)
363 benchmarkIdamax(b, n, x, incX)
366 func BenchmarkIdamaxSmallPosInc(b *testing.B) {
369 x := randomSlice(n, incX)
371 benchmarkIdamax(b, n, x, incX)
374 func BenchmarkIdamaxMediumUnitaryInc(b *testing.B) {
377 x := randomSlice(n, incX)
379 benchmarkIdamax(b, n, x, incX)
382 func BenchmarkIdamaxMediumPosInc(b *testing.B) {
385 x := randomSlice(n, incX)
387 benchmarkIdamax(b, n, x, incX)
390 func BenchmarkIdamaxLargeUnitaryInc(b *testing.B) {
393 x := randomSlice(n, incX)
395 benchmarkIdamax(b, n, x, incX)
398 func BenchmarkIdamaxLargePosInc(b *testing.B) {
401 x := randomSlice(n, incX)
403 benchmarkIdamax(b, n, x, incX)
406 func BenchmarkIdamaxHugeUnitaryInc(b *testing.B) {
409 x := randomSlice(n, incX)
411 benchmarkIdamax(b, n, x, incX)
414 func BenchmarkIdamaxHugePosInc(b *testing.B) {
417 x := randomSlice(n, incX)
419 benchmarkIdamax(b, n, x, incX)
422 /* ------------------ */
423 func benchmarkDswap(b *testing.B, n int, x []float64, incX int, y []float64, incY int) {
425 for i := 0; i < b.N; i++ {
426 impl.Dswap(n, x, incX, y, incY)
430 func BenchmarkDswapSmallBothUnitary(b *testing.B) {
433 x := randomSlice(n, incX)
435 y := randomSlice(n, incY)
437 benchmarkDswap(b, n, x, incX, y, incY)
440 func BenchmarkDswapSmallIncUni(b *testing.B) {
443 x := randomSlice(n, incX)
445 y := randomSlice(n, incY)
447 benchmarkDswap(b, n, x, incX, y, incY)
450 func BenchmarkDswapSmallUniInc(b *testing.B) {
453 x := randomSlice(n, incX)
455 y := randomSlice(n, incY)
457 benchmarkDswap(b, n, x, incX, y, incY)
460 func BenchmarkDswapSmallBothInc(b *testing.B) {
463 x := randomSlice(n, incX)
465 y := randomSlice(n, incY)
467 benchmarkDswap(b, n, x, incX, y, incY)
470 func BenchmarkDswapMediumBothUnitary(b *testing.B) {
473 x := randomSlice(n, incX)
475 y := randomSlice(n, incY)
477 benchmarkDswap(b, n, x, incX, y, incY)
480 func BenchmarkDswapMediumIncUni(b *testing.B) {
483 x := randomSlice(n, incX)
485 y := randomSlice(n, incY)
487 benchmarkDswap(b, n, x, incX, y, incY)
490 func BenchmarkDswapMediumUniInc(b *testing.B) {
493 x := randomSlice(n, incX)
495 y := randomSlice(n, incY)
497 benchmarkDswap(b, n, x, incX, y, incY)
500 func BenchmarkDswapMediumBothInc(b *testing.B) {
503 x := randomSlice(n, incX)
505 y := randomSlice(n, incY)
507 benchmarkDswap(b, n, x, incX, y, incY)
510 func BenchmarkDswapLargeBothUnitary(b *testing.B) {
513 x := randomSlice(n, incX)
515 y := randomSlice(n, incY)
517 benchmarkDswap(b, n, x, incX, y, incY)
520 func BenchmarkDswapLargeIncUni(b *testing.B) {
523 x := randomSlice(n, incX)
525 y := randomSlice(n, incY)
527 benchmarkDswap(b, n, x, incX, y, incY)
530 func BenchmarkDswapLargeUniInc(b *testing.B) {
533 x := randomSlice(n, incX)
535 y := randomSlice(n, incY)
537 benchmarkDswap(b, n, x, incX, y, incY)
540 func BenchmarkDswapLargeBothInc(b *testing.B) {
543 x := randomSlice(n, incX)
545 y := randomSlice(n, incY)
547 benchmarkDswap(b, n, x, incX, y, incY)
550 func BenchmarkDswapHugeBothUnitary(b *testing.B) {
553 x := randomSlice(n, incX)
555 y := randomSlice(n, incY)
557 benchmarkDswap(b, n, x, incX, y, incY)
560 func BenchmarkDswapHugeIncUni(b *testing.B) {
563 x := randomSlice(n, incX)
565 y := randomSlice(n, incY)
567 benchmarkDswap(b, n, x, incX, y, incY)
570 func BenchmarkDswapHugeUniInc(b *testing.B) {
573 x := randomSlice(n, incX)
575 y := randomSlice(n, incY)
577 benchmarkDswap(b, n, x, incX, y, incY)
580 func BenchmarkDswapHugeBothInc(b *testing.B) {
583 x := randomSlice(n, incX)
585 y := randomSlice(n, incY)
587 benchmarkDswap(b, n, x, incX, y, incY)
590 /* ------------------ */
591 func benchmarkDcopy(b *testing.B, n int, x []float64, incX int, y []float64, incY int) {
593 for i := 0; i < b.N; i++ {
594 impl.Dcopy(n, x, incX, y, incY)
598 func BenchmarkDcopySmallBothUnitary(b *testing.B) {
601 x := randomSlice(n, incX)
603 y := randomSlice(n, incY)
605 benchmarkDcopy(b, n, x, incX, y, incY)
608 func BenchmarkDcopySmallIncUni(b *testing.B) {
611 x := randomSlice(n, incX)
613 y := randomSlice(n, incY)
615 benchmarkDcopy(b, n, x, incX, y, incY)
618 func BenchmarkDcopySmallUniInc(b *testing.B) {
621 x := randomSlice(n, incX)
623 y := randomSlice(n, incY)
625 benchmarkDcopy(b, n, x, incX, y, incY)
628 func BenchmarkDcopySmallBothInc(b *testing.B) {
631 x := randomSlice(n, incX)
633 y := randomSlice(n, incY)
635 benchmarkDcopy(b, n, x, incX, y, incY)
638 func BenchmarkDcopyMediumBothUnitary(b *testing.B) {
641 x := randomSlice(n, incX)
643 y := randomSlice(n, incY)
645 benchmarkDcopy(b, n, x, incX, y, incY)
648 func BenchmarkDcopyMediumIncUni(b *testing.B) {
651 x := randomSlice(n, incX)
653 y := randomSlice(n, incY)
655 benchmarkDcopy(b, n, x, incX, y, incY)
658 func BenchmarkDcopyMediumUniInc(b *testing.B) {
661 x := randomSlice(n, incX)
663 y := randomSlice(n, incY)
665 benchmarkDcopy(b, n, x, incX, y, incY)
668 func BenchmarkDcopyMediumBothInc(b *testing.B) {
671 x := randomSlice(n, incX)
673 y := randomSlice(n, incY)
675 benchmarkDcopy(b, n, x, incX, y, incY)
678 func BenchmarkDcopyLargeBothUnitary(b *testing.B) {
681 x := randomSlice(n, incX)
683 y := randomSlice(n, incY)
685 benchmarkDcopy(b, n, x, incX, y, incY)
688 func BenchmarkDcopyLargeIncUni(b *testing.B) {
691 x := randomSlice(n, incX)
693 y := randomSlice(n, incY)
695 benchmarkDcopy(b, n, x, incX, y, incY)
698 func BenchmarkDcopyLargeUniInc(b *testing.B) {
701 x := randomSlice(n, incX)
703 y := randomSlice(n, incY)
705 benchmarkDcopy(b, n, x, incX, y, incY)
708 func BenchmarkDcopyLargeBothInc(b *testing.B) {
711 x := randomSlice(n, incX)
713 y := randomSlice(n, incY)
715 benchmarkDcopy(b, n, x, incX, y, incY)
718 func BenchmarkDcopyHugeBothUnitary(b *testing.B) {
721 x := randomSlice(n, incX)
723 y := randomSlice(n, incY)
725 benchmarkDcopy(b, n, x, incX, y, incY)
728 func BenchmarkDcopyHugeIncUni(b *testing.B) {
731 x := randomSlice(n, incX)
733 y := randomSlice(n, incY)
735 benchmarkDcopy(b, n, x, incX, y, incY)
738 func BenchmarkDcopyHugeUniInc(b *testing.B) {
741 x := randomSlice(n, incX)
743 y := randomSlice(n, incY)
745 benchmarkDcopy(b, n, x, incX, y, incY)
748 func BenchmarkDcopyHugeBothInc(b *testing.B) {
751 x := randomSlice(n, incX)
753 y := randomSlice(n, incY)
755 benchmarkDcopy(b, n, x, incX, y, incY)
758 /* ------------------ */
759 func benchmarkDaxpy(b *testing.B, n int, alpha float64, x []float64, incX int, y []float64, incY int) {
761 for i := 0; i < b.N; i++ {
762 impl.Daxpy(n, alpha, x, incX, y, incY)
766 func BenchmarkDaxpySmallBothUnitary(b *testing.B) {
769 x := randomSlice(n, incX)
771 y := randomSlice(n, incY)
773 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
776 func BenchmarkDaxpySmallIncUni(b *testing.B) {
779 x := randomSlice(n, incX)
781 y := randomSlice(n, incY)
783 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
786 func BenchmarkDaxpySmallUniInc(b *testing.B) {
789 x := randomSlice(n, incX)
791 y := randomSlice(n, incY)
793 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
796 func BenchmarkDaxpySmallBothInc(b *testing.B) {
799 x := randomSlice(n, incX)
801 y := randomSlice(n, incY)
803 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
806 func BenchmarkDaxpyMediumBothUnitary(b *testing.B) {
809 x := randomSlice(n, incX)
811 y := randomSlice(n, incY)
813 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
816 func BenchmarkDaxpyMediumIncUni(b *testing.B) {
819 x := randomSlice(n, incX)
821 y := randomSlice(n, incY)
823 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
826 func BenchmarkDaxpyMediumUniInc(b *testing.B) {
829 x := randomSlice(n, incX)
831 y := randomSlice(n, incY)
833 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
836 func BenchmarkDaxpyMediumBothInc(b *testing.B) {
839 x := randomSlice(n, incX)
841 y := randomSlice(n, incY)
843 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
846 func BenchmarkDaxpyLargeBothUnitary(b *testing.B) {
849 x := randomSlice(n, incX)
851 y := randomSlice(n, incY)
853 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
856 func BenchmarkDaxpyLargeIncUni(b *testing.B) {
859 x := randomSlice(n, incX)
861 y := randomSlice(n, incY)
863 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
866 func BenchmarkDaxpyLargeUniInc(b *testing.B) {
869 x := randomSlice(n, incX)
871 y := randomSlice(n, incY)
873 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
876 func BenchmarkDaxpyLargeBothInc(b *testing.B) {
879 x := randomSlice(n, incX)
881 y := randomSlice(n, incY)
883 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
886 func BenchmarkDaxpyHugeBothUnitary(b *testing.B) {
889 x := randomSlice(n, incX)
891 y := randomSlice(n, incY)
893 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
896 func BenchmarkDaxpyHugeIncUni(b *testing.B) {
899 x := randomSlice(n, incX)
901 y := randomSlice(n, incY)
903 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
906 func BenchmarkDaxpyHugeUniInc(b *testing.B) {
909 x := randomSlice(n, incX)
911 y := randomSlice(n, incY)
913 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
916 func BenchmarkDaxpyHugeBothInc(b *testing.B) {
919 x := randomSlice(n, incX)
921 y := randomSlice(n, incY)
923 benchmarkDaxpy(b, n, alpha, x, incX, y, incY)
926 /* ------------------ */
927 func benchmarkDrot(b *testing.B, n int, x []float64, incX int, y []float64, incY int, c, s float64) {
929 for i := 0; i < b.N; i++ {
930 impl.Drot(n, x, incX, y, incY, c, s)
934 func BenchmarkDrotSmallBothUnitary(b *testing.B) {
937 x := randomSlice(n, incX)
939 y := randomSlice(n, incY)
942 benchmarkDrot(b, n, x, incX, y, incY, c, s)
945 func BenchmarkDrotSmallIncUni(b *testing.B) {
948 x := randomSlice(n, incX)
950 y := randomSlice(n, incY)
953 benchmarkDrot(b, n, x, incX, y, incY, c, s)
956 func BenchmarkDrotSmallUniInc(b *testing.B) {
959 x := randomSlice(n, incX)
961 y := randomSlice(n, incY)
964 benchmarkDrot(b, n, x, incX, y, incY, c, s)
967 func BenchmarkDrotSmallBothInc(b *testing.B) {
970 x := randomSlice(n, incX)
972 y := randomSlice(n, incY)
975 benchmarkDrot(b, n, x, incX, y, incY, c, s)
978 func BenchmarkDrotMediumBothUnitary(b *testing.B) {
981 x := randomSlice(n, incX)
983 y := randomSlice(n, incY)
986 benchmarkDrot(b, n, x, incX, y, incY, c, s)
989 func BenchmarkDrotMediumIncUni(b *testing.B) {
992 x := randomSlice(n, incX)
994 y := randomSlice(n, incY)
997 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1000 func BenchmarkDrotMediumUniInc(b *testing.B) {
1003 x := randomSlice(n, incX)
1005 y := randomSlice(n, incY)
1008 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1011 func BenchmarkDrotMediumBothInc(b *testing.B) {
1014 x := randomSlice(n, incX)
1016 y := randomSlice(n, incY)
1019 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1022 func BenchmarkDrotLargeBothUnitary(b *testing.B) {
1025 x := randomSlice(n, incX)
1027 y := randomSlice(n, incY)
1030 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1033 func BenchmarkDrotLargeIncUni(b *testing.B) {
1036 x := randomSlice(n, incX)
1038 y := randomSlice(n, incY)
1041 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1044 func BenchmarkDrotLargeUniInc(b *testing.B) {
1047 x := randomSlice(n, incX)
1049 y := randomSlice(n, incY)
1052 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1055 func BenchmarkDrotLargeBothInc(b *testing.B) {
1058 x := randomSlice(n, incX)
1060 y := randomSlice(n, incY)
1063 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1066 func BenchmarkDrotHugeBothUnitary(b *testing.B) {
1069 x := randomSlice(n, incX)
1071 y := randomSlice(n, incY)
1074 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1077 func BenchmarkDrotHugeIncUni(b *testing.B) {
1080 x := randomSlice(n, incX)
1082 y := randomSlice(n, incY)
1085 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1088 func BenchmarkDrotHugeUniInc(b *testing.B) {
1091 x := randomSlice(n, incX)
1093 y := randomSlice(n, incY)
1096 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1099 func BenchmarkDrotHugeBothInc(b *testing.B) {
1102 x := randomSlice(n, incX)
1104 y := randomSlice(n, incY)
1107 benchmarkDrot(b, n, x, incX, y, incY, c, s)
1110 /* ------------------ */
1111 func benchmarkDrotmOffDia(b *testing.B, n int, x []float64, incX int, y []float64, incY int, p blas.DrotmParams) {
1113 for i := 0; i < b.N; i++ {
1114 impl.Drotm(n, x, incX, y, incY, p)
1118 func BenchmarkDrotmOffDiaSmallBothUnitary(b *testing.B) {
1121 x := randomSlice(n, incX)
1123 y := randomSlice(n, incY)
1124 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1125 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1128 func BenchmarkDrotmOffDiaSmallIncUni(b *testing.B) {
1131 x := randomSlice(n, incX)
1133 y := randomSlice(n, incY)
1134 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1135 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1138 func BenchmarkDrotmOffDiaSmallUniInc(b *testing.B) {
1141 x := randomSlice(n, incX)
1143 y := randomSlice(n, incY)
1144 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1145 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1148 func BenchmarkDrotmOffDiaSmallBothInc(b *testing.B) {
1151 x := randomSlice(n, incX)
1153 y := randomSlice(n, incY)
1154 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1155 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1158 func BenchmarkDrotmOffDiaMediumBothUnitary(b *testing.B) {
1161 x := randomSlice(n, incX)
1163 y := randomSlice(n, incY)
1164 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1165 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1168 func BenchmarkDrotmOffDiaMediumIncUni(b *testing.B) {
1171 x := randomSlice(n, incX)
1173 y := randomSlice(n, incY)
1174 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1175 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1178 func BenchmarkDrotmOffDiaMediumUniInc(b *testing.B) {
1181 x := randomSlice(n, incX)
1183 y := randomSlice(n, incY)
1184 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1185 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1188 func BenchmarkDrotmOffDiaMediumBothInc(b *testing.B) {
1191 x := randomSlice(n, incX)
1193 y := randomSlice(n, incY)
1194 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1195 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1198 func BenchmarkDrotmOffDiaLargeBothUnitary(b *testing.B) {
1201 x := randomSlice(n, incX)
1203 y := randomSlice(n, incY)
1204 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1205 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1208 func BenchmarkDrotmOffDiaLargeIncUni(b *testing.B) {
1211 x := randomSlice(n, incX)
1213 y := randomSlice(n, incY)
1214 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1215 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1218 func BenchmarkDrotmOffDiaLargeUniInc(b *testing.B) {
1221 x := randomSlice(n, incX)
1223 y := randomSlice(n, incY)
1224 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1225 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1228 func BenchmarkDrotmOffDiaLargeBothInc(b *testing.B) {
1231 x := randomSlice(n, incX)
1233 y := randomSlice(n, incY)
1234 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1235 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1238 func BenchmarkDrotmOffDiaHugeBothUnitary(b *testing.B) {
1241 x := randomSlice(n, incX)
1243 y := randomSlice(n, incY)
1244 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1245 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1248 func BenchmarkDrotmOffDiaHugeIncUni(b *testing.B) {
1251 x := randomSlice(n, incX)
1253 y := randomSlice(n, incY)
1254 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1255 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1258 func BenchmarkDrotmOffDiaHugeUniInc(b *testing.B) {
1261 x := randomSlice(n, incX)
1263 y := randomSlice(n, incY)
1264 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1265 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1268 func BenchmarkDrotmOffDiaHugeBothInc(b *testing.B) {
1271 x := randomSlice(n, incX)
1273 y := randomSlice(n, incY)
1274 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{0, -0.625, 0.9375, 0}}
1275 benchmarkDrotmOffDia(b, n, x, incX, y, incY, p)
1278 /* ------------------ */
1279 func benchmarkDrotmDia(b *testing.B, n int, x []float64, incX int, y []float64, incY int, p blas.DrotmParams) {
1281 for i := 0; i < b.N; i++ {
1282 impl.Drotm(n, x, incX, y, incY, p)
1286 func BenchmarkDrotmDiaSmallBothUnitary(b *testing.B) {
1289 x := randomSlice(n, incX)
1291 y := randomSlice(n, incY)
1292 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1293 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1296 func BenchmarkDrotmDiaSmallIncUni(b *testing.B) {
1299 x := randomSlice(n, incX)
1301 y := randomSlice(n, incY)
1302 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1303 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1306 func BenchmarkDrotmDiaSmallUniInc(b *testing.B) {
1309 x := randomSlice(n, incX)
1311 y := randomSlice(n, incY)
1312 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1313 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1316 func BenchmarkDrotmDiaSmallBothInc(b *testing.B) {
1319 x := randomSlice(n, incX)
1321 y := randomSlice(n, incY)
1322 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1323 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1326 func BenchmarkDrotmDiaMediumBothUnitary(b *testing.B) {
1329 x := randomSlice(n, incX)
1331 y := randomSlice(n, incY)
1332 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1333 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1336 func BenchmarkDrotmDiaMediumIncUni(b *testing.B) {
1339 x := randomSlice(n, incX)
1341 y := randomSlice(n, incY)
1342 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1343 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1346 func BenchmarkDrotmDiaMediumUniInc(b *testing.B) {
1349 x := randomSlice(n, incX)
1351 y := randomSlice(n, incY)
1352 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1353 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1356 func BenchmarkDrotmDiaMediumBothInc(b *testing.B) {
1359 x := randomSlice(n, incX)
1361 y := randomSlice(n, incY)
1362 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1363 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1366 func BenchmarkDrotmDiaLargeBothUnitary(b *testing.B) {
1369 x := randomSlice(n, incX)
1371 y := randomSlice(n, incY)
1372 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1373 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1376 func BenchmarkDrotmDiaLargeIncUni(b *testing.B) {
1379 x := randomSlice(n, incX)
1381 y := randomSlice(n, incY)
1382 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1383 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1386 func BenchmarkDrotmDiaLargeUniInc(b *testing.B) {
1389 x := randomSlice(n, incX)
1391 y := randomSlice(n, incY)
1392 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1393 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1396 func BenchmarkDrotmDiaLargeBothInc(b *testing.B) {
1399 x := randomSlice(n, incX)
1401 y := randomSlice(n, incY)
1402 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1403 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1406 func BenchmarkDrotmDiaHugeBothUnitary(b *testing.B) {
1409 x := randomSlice(n, incX)
1411 y := randomSlice(n, incY)
1412 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1413 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1416 func BenchmarkDrotmDiaHugeIncUni(b *testing.B) {
1419 x := randomSlice(n, incX)
1421 y := randomSlice(n, incY)
1422 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1423 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1426 func BenchmarkDrotmDiaHugeUniInc(b *testing.B) {
1429 x := randomSlice(n, incX)
1431 y := randomSlice(n, incY)
1432 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1433 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1436 func BenchmarkDrotmDiaHugeBothInc(b *testing.B) {
1439 x := randomSlice(n, incX)
1441 y := randomSlice(n, incY)
1442 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{5.0 / 12, 0, 0, 0.625}}
1443 benchmarkDrotmDia(b, n, x, incX, y, incY, p)
1446 /* ------------------ */
1447 func benchmarkDrotmResc(b *testing.B, n int, x []float64, incX int, y []float64, incY int, p blas.DrotmParams) {
1449 for i := 0; i < b.N; i++ {
1450 impl.Drotm(n, x, incX, y, incY, p)
1454 func BenchmarkDrotmRescSmallBothUnitary(b *testing.B) {
1457 x := randomSlice(n, incX)
1459 y := randomSlice(n, incY)
1460 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1461 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1464 func BenchmarkDrotmRescSmallIncUni(b *testing.B) {
1467 x := randomSlice(n, incX)
1469 y := randomSlice(n, incY)
1470 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1471 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1474 func BenchmarkDrotmRescSmallUniInc(b *testing.B) {
1477 x := randomSlice(n, incX)
1479 y := randomSlice(n, incY)
1480 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1481 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1484 func BenchmarkDrotmRescSmallBothInc(b *testing.B) {
1487 x := randomSlice(n, incX)
1489 y := randomSlice(n, incY)
1490 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1491 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1494 func BenchmarkDrotmRescMediumBothUnitary(b *testing.B) {
1497 x := randomSlice(n, incX)
1499 y := randomSlice(n, incY)
1500 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1501 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1504 func BenchmarkDrotmRescMediumIncUni(b *testing.B) {
1507 x := randomSlice(n, incX)
1509 y := randomSlice(n, incY)
1510 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1511 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1514 func BenchmarkDrotmRescMediumUniInc(b *testing.B) {
1517 x := randomSlice(n, incX)
1519 y := randomSlice(n, incY)
1520 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1521 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1524 func BenchmarkDrotmRescMediumBothInc(b *testing.B) {
1527 x := randomSlice(n, incX)
1529 y := randomSlice(n, incY)
1530 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1531 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1534 func BenchmarkDrotmRescLargeBothUnitary(b *testing.B) {
1537 x := randomSlice(n, incX)
1539 y := randomSlice(n, incY)
1540 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1541 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1544 func BenchmarkDrotmRescLargeIncUni(b *testing.B) {
1547 x := randomSlice(n, incX)
1549 y := randomSlice(n, incY)
1550 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1551 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1554 func BenchmarkDrotmRescLargeUniInc(b *testing.B) {
1557 x := randomSlice(n, incX)
1559 y := randomSlice(n, incY)
1560 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1561 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1564 func BenchmarkDrotmRescLargeBothInc(b *testing.B) {
1567 x := randomSlice(n, incX)
1569 y := randomSlice(n, incY)
1570 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1571 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1574 func BenchmarkDrotmRescHugeBothUnitary(b *testing.B) {
1577 x := randomSlice(n, incX)
1579 y := randomSlice(n, incY)
1580 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1581 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1584 func BenchmarkDrotmRescHugeIncUni(b *testing.B) {
1587 x := randomSlice(n, incX)
1589 y := randomSlice(n, incY)
1590 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1591 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1594 func BenchmarkDrotmRescHugeUniInc(b *testing.B) {
1597 x := randomSlice(n, incX)
1599 y := randomSlice(n, incY)
1600 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1601 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1604 func BenchmarkDrotmRescHugeBothInc(b *testing.B) {
1607 x := randomSlice(n, incX)
1609 y := randomSlice(n, incY)
1610 p := blas.DrotmParams{Flag: blas.OffDiagonal, H: [4]float64{4096, -3584, 1792, 4096}}
1611 benchmarkDrotmResc(b, n, x, incX, y, incY, p)
1614 /* ------------------ */
1615 func benchmarkDscal(b *testing.B, n int, alpha float64, x []float64, incX int) {
1617 for i := 0; i < b.N; i++ {
1618 impl.Dscal(n, alpha, x, incX)
1622 func BenchmarkDscalSmallUnitaryInc(b *testing.B) {
1625 x := randomSlice(n, incX)
1627 benchmarkDscal(b, n, alpha, x, incX)
1630 func BenchmarkDscalSmallPosInc(b *testing.B) {
1633 x := randomSlice(n, incX)
1635 benchmarkDscal(b, n, alpha, x, incX)
1638 func BenchmarkDscalMediumUnitaryInc(b *testing.B) {
1641 x := randomSlice(n, incX)
1643 benchmarkDscal(b, n, alpha, x, incX)
1646 func BenchmarkDscalMediumPosInc(b *testing.B) {
1649 x := randomSlice(n, incX)
1651 benchmarkDscal(b, n, alpha, x, incX)
1654 func BenchmarkDscalLargeUnitaryInc(b *testing.B) {
1657 x := randomSlice(n, incX)
1659 benchmarkDscal(b, n, alpha, x, incX)
1662 func BenchmarkDscalLargePosInc(b *testing.B) {
1665 x := randomSlice(n, incX)
1667 benchmarkDscal(b, n, alpha, x, incX)
1670 func BenchmarkDscalHugeUnitaryInc(b *testing.B) {
1673 x := randomSlice(n, incX)
1675 benchmarkDscal(b, n, alpha, x, incX)
1678 func BenchmarkDscalHugePosInc(b *testing.B) {
1681 x := randomSlice(n, incX)
1683 benchmarkDscal(b, n, alpha, x, incX)
1686 /* ------------------ */