|
| 1 | +/** @file printGPUMATMULTCONF.c |
| 2 | + */ |
| 3 | + |
| 4 | +#ifdef HAVE_CUDA |
| 5 | + |
| 6 | + |
| 7 | +#include "CommandLineInterface/CLIcore.h" |
| 8 | + |
| 9 | +#include "cudacomp_types.h" |
| 10 | + |
| 11 | + |
| 12 | +extern GPUMATMULTCONF gpumatmultconf[20]; |
| 13 | + |
| 14 | + |
| 15 | +errno_t CUDACOMP_printGPUMATMULTCONF(int index) |
| 16 | +{ |
| 17 | + printf("\n"); |
| 18 | + printf("============= GPUMATMULTCONF %d ======================\n", index); |
| 19 | + printf(" init = %20d\n", (int) gpumatmultconf[index].init); |
| 20 | + printf(" refWFSinit = %p\n", (void *) gpumatmultconf[index].refWFSinit); |
| 21 | + |
| 22 | + if(gpumatmultconf[index].refWFSinit != NULL) |
| 23 | + { |
| 24 | + printf(" refWFSinit[0] = %20d\n", |
| 25 | + (int) gpumatmultconf[index].refWFSinit[0]); |
| 26 | + } |
| 27 | + |
| 28 | + printf(" alloc = %20d\n", (int) gpumatmultconf[index].alloc); |
| 29 | + printf(" CM_ID = %20ld\n", gpumatmultconf[index].CM_ID); |
| 30 | + printf(" CM_cnt = %20ld\n", gpumatmultconf[index].CM_cnt); |
| 31 | + printf(" timerID = %20ld\n", gpumatmultconf[index].timerID); |
| 32 | + printf(" M = %20d\n", (int) gpumatmultconf[index].M); |
| 33 | + printf(" N = %20d\n", (int) gpumatmultconf[index].N); |
| 34 | + |
| 35 | + /// synchronization |
| 36 | + printf(" sem = %20d\n", (int) gpumatmultconf[index].sem); |
| 37 | + printf(" gpuinit = %20d\n", (int) gpumatmultconf[index].gpuinit); |
| 38 | + |
| 39 | + /// one semaphore per thread |
| 40 | + /* |
| 41 | + sem_t **semptr1; |
| 42 | + sem_t **semptr2; |
| 43 | + sem_t **semptr3; |
| 44 | + sem_t **semptr4; |
| 45 | + sem_t **semptr5; |
| 46 | + */ |
| 47 | + |
| 48 | + printf(" cMat = %20p\n", (void *) gpumatmultconf[index].cMat); |
| 49 | + printf(" cMat_part = %20p\n", (void *) gpumatmultconf[index].cMat_part); |
| 50 | + printf(" wfsVec = %20p\n", (void *) gpumatmultconf[index].wfsVec); |
| 51 | + printf(" wfsVec_part = %20p\n", |
| 52 | + (void *) gpumatmultconf[index].wfsVec_part); |
| 53 | + printf(" wfsRef = %20p\n", (void *) gpumatmultconf[index].wfsRef); |
| 54 | + printf(" wfsRef_part = %20p\n", |
| 55 | + (void *) gpumatmultconf[index].wfsRef_part); |
| 56 | + printf(" dmVec = %20p\n", (void *) gpumatmultconf[index].dmVec); |
| 57 | + printf(" dmVecTMP = %20p\n", (void *) gpumatmultconf[index].dmVecTMP); |
| 58 | + printf(" dmVec_part = %20p\n", |
| 59 | + (void *) gpumatmultconf[index].dmVec_part); |
| 60 | + printf(" dmRef_part = %20p\n", |
| 61 | + (void *) gpumatmultconf[index].dmRef_part); |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + printf(" d_cMat = %20p\n", (void *) gpumatmultconf[index].d_cMat); |
| 66 | + printf(" d_wfsVec = %20p\n", (void *) gpumatmultconf[index].d_wfsVec); |
| 67 | + printf(" d_dmVec = %20p\n", (void *) gpumatmultconf[index].d_dmVec); |
| 68 | + printf(" d_wfsRef = %20p\n", (void *) gpumatmultconf[index].d_wfsRef); |
| 69 | + printf(" d_dmRef = %20p\n", (void *) gpumatmultconf[index].d_dmRef); |
| 70 | + |
| 71 | + |
| 72 | + // threads |
| 73 | + printf(" thdata = %20p\n", (void *) gpumatmultconf[index].thdata); |
| 74 | + printf(" threadarray = %20p\n", |
| 75 | + (void *) gpumatmultconf[index].threadarray); |
| 76 | + printf(" NBstreams = %20d\n", (int) gpumatmultconf[index].NBstreams); |
| 77 | + printf(" stream = %20p\n", (void *) gpumatmultconf[index].stream); |
| 78 | + printf(" handle = %20p\n", (void *) gpumatmultconf[index].handle); |
| 79 | + |
| 80 | + |
| 81 | + printf(" Nsize = %20p\n", (void *) gpumatmultconf[index].Nsize); |
| 82 | + printf(" Noffset = %20p\n", (void *) gpumatmultconf[index].Noffset); |
| 83 | + printf(" GPUdevice = %20p\n", (void *) gpumatmultconf[index].GPUdevice); |
| 84 | + |
| 85 | + printf(" orientation = %20d\n", (int) gpumatmultconf[index].orientation); |
| 86 | + |
| 87 | + printf("======================================================\n"); |
| 88 | + printf("\n"); |
| 89 | + |
| 90 | + return RETURN_SUCCESS; |
| 91 | +} |
| 92 | + |
| 93 | + |
| 94 | +#endif |
0 commit comments