MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / loadRawFile

Function loadRawFile

cpp/5_Domain_Specific/volumeRender/volumeRender.cpp:450–470  ·  view source on GitHub ↗

Load raw data from disk

Source from the content-addressed store, hash-verified

448
449// Load raw data from disk
450void *loadRawFile(char *filename, size_t size)
451{
452 FILE *fp = fopen(filename, "rb");
453
454 if (!fp) {
455 fprintf(stderr, "Error opening file '%s'\n", filename);
456 return 0;
457 }
458
459 void *data = malloc(size);
460 size_t read = fread(data, 1, size, fp);
461 fclose(fp);
462
463#if defined(_MSC_VER_)
464 printf("Read '%s', %Iu bytes\n", filename, read);
465#else
466 printf("Read '%s', %zu bytes\n", filename, read);
467#endif
468
469 return data;
470}
471
472void runSingleTest(const char *ref_file, const char *exec_path)
473{

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected