#include "p3pack.h" /*****************************************************************************/ void bmat_print(unsigned *A, int nbits) /* Print binary matrix A */ { int i,j; unsigned ipiv; printf(" Matrix \n"); printf("------------------------------------------------------\n"); for (i=0,ipiv=1;inmem); if (numiter <1) numiter = 1; P_MALLOC(llarr,16*R->nmem,plural unsigned long long); printf("\nTiming for perfect shuffle & conjug. in all bits:\n"); printf("------------------------------------------------\n"); gettimeofday(&beg,0); for (i=0;inmem)/(eltime*1.0e6); printf("Routing speed: %f mega-routings\n",megas); printf("Blocksize 1:\n"); for (j=1;j<9;j<<=1) { gettimeofday(&beg,0); for (i=0;inmem)/(eltime*1.0e6); printf("Permutation speed, %d bit: %f mega-permuts %5.2f Mbyte/sec\n", j*8,megas,megas*j); } printf("Blocksize 8:\n"); for (j=1;j<9;j<<=1) { gettimeofday(&beg,0); for (i=0;inmem)/(eltime*1.0e6); printf("Permutation speed, %d bit: %f mega-permuts %5.2f Mbyte/sec\n", j*64,megas,megas*j*8); } /* make perfect shuffle in memory bits (could be done easier) */ for(i=0;i<32;i++) { rhs[i] = 0; for(j=0;j<32;j++) mat[i*nbits+j] = 0; } for(i=0;inmem)/(eltime*1.0e6); printf("Routing speed: %f mega-routings\n",megas); numiter *= 5; printf("Blocksize 1:\n"); for (j=1;j<9;j<<=1) { gettimeofday(&beg,0); for (i=0;inmem)/(eltime*1.0e6); printf("Permutation speed, %d bit: %f mega-permuts %5.2f Mbyte/sec\n", j*8,megas,megas*j); } printf("Blocksize 8:\n"); for (j=1;j<9;j<<=1) { gettimeofday(&beg,0); for (i=0;inmem)/(eltime*1.0e6); printf("Permutation speed, %d bit: %f mega-permuts %5.2f Mbyte/sec\n", j*64,megas,megas*j*8); } p_free(llarr); } }