Go to the source code of this file.
◆ flops_driver()
| void flops_driver |
( |
char * |
papi_event_str, |
|
|
hw_desc_t * |
hw_desc, |
|
|
char * |
outdir |
|
) |
| |
Definition at line 841 of file flops.c.
841 {
844 FILE* ofp_papi;
845 const char *sufx = ".flops";
846 char *papiFileName;
847
848 (void)hw_desc;
849
850 int l = strlen(outdir)+strlen(papi_event_name)+strlen(sufx);
851 if (NULL == (papiFileName = (char *)calloc( 1+l, sizeof(char)))) {
852 return;
853 }
854 if (l != (sprintf(papiFileName, "%s%s%s", outdir, papi_event_name, sufx))) {
855 goto error0;
856 }
857 if (NULL == (ofp_papi = fopen(papiFileName,"w"))) {
858 fprintf(
stderr,
"Failed to open file %s.\n", papiFileName);
859 goto error0;
860 }
861
864 goto error1;
865 }
866
869 goto error1;
870 }
871
875
878 goto error1;
879 }
882 goto error1;
883 }
884
885error1:
887error0:
888 free(papiFileName);
889 return;
890}
add PAPI preset or native hardware event by name to an EventSet
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
void exec_flops(int precision, int EventSet, FILE *fp)
int fclose(FILE *__stream)