@@ -460,13 +460,6 @@ def c_support_code(self, **kwargs):
460
460
#ifndef MOD
461
461
#define MOD %
462
462
#endif
463
- static double time_time() // a time function like time.perf_counter()
464
- {
465
- struct timeval tv;
466
- gettimeofday(&tv, 0);
467
- return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0;
468
- }
469
-
470
463
void compute_strides(npy_intp *shape, int N_shape, int type_size, npy_intp *res) {
471
464
int s;
472
465
res[N_shape - 1] = type_size;
@@ -481,7 +474,7 @@ def c_support_code(self, **kwargs):
481
474
def c_headers (self , ** kwargs ):
482
475
# std.cout doesn't require the '%' symbol to print stuff...
483
476
# so it works much better with python's string-substitution stuff.
484
- return ["<iostream>" , "<time.h>" , "<sys/time.h>" ]
477
+ return ["<iostream>" ]
485
478
486
479
def c_libraries (self , ** kwargs ):
487
480
return ldflags ()
@@ -690,8 +683,6 @@ def c_header_dirs(self, **kwargs):
690
683
char N = 'N';
691
684
char T = 'T';
692
685
int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
693
- //std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '\\ n';
694
- //double t0 = time_time();
695
686
switch(unit)
696
687
{
697
688
case 0x000: sgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y, &sy_0, x, &sx_0, &b, z, &sz_0); break;
@@ -704,7 +695,6 @@ def c_header_dirs(self, **kwargs):
704
695
case 0x111: sgemm_(&N, &N, &Nz0, &Nz1, &Nx1, &a, x, &sx_1, y, &sy_1, &b, z, &sz_1); break;
705
696
default: PyErr_SetString(PyExc_ValueError, "some matrix has no unit stride"); %(fail)s;
706
697
};
707
- //fprintf(stderr, "Calling sgemm %%i %%i %%i %%i took %%f\\ n", unit, Nz1, Nz0, Nx1, time_time() - t0);
708
698
"""
709
699
710
700
case_double = """
@@ -723,14 +713,6 @@ def c_header_dirs(self, **kwargs):
723
713
char N = 'N';
724
714
char T = 'T';
725
715
int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
726
- //std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '\\ n';
727
- //double t0 = time_time();
728
- //fprintf(stderr, "unit=%%x N= %%i %%i %%i S = %%i %%i %%i %%i %%i %%i\\ n", unit,
729
- //Nz1, Nz0, Nx1,
730
- //sy_0, sy_1,
731
- //sx_0, sx_1,
732
- //sz_0, sz_1
733
- //);
734
716
switch(unit)
735
717
{
736
718
case 0x000: dgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y,
@@ -753,8 +735,6 @@ def c_header_dirs(self, **kwargs):
753
735
"some matrix has no unit stride");
754
736
%(fail)s;
755
737
};
756
- //fprintf(stderr, "Calling dgemm %%i %%i %%i %%i took %%f\\ n",
757
- // unit, Nz1, Nz0, Nx1, time_time()- t0);
758
738
"""
759
739
760
740
end_switch_typenum = """
0 commit comments