MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / read_map

Function read_map

yolo_detector/darknet_opt/src/utils.c:56–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int *read_map(char *filename)
57{
58 int n = 0;
59 int *map = 0;
60 char *str;
61 FILE *file = fopen(filename, "r");
62 if(!file) file_error(filename);
63 while((str=fgetl(file))){
64 ++n;
65 map = realloc(map, n*sizeof(int));
66 map[n-1] = atoi(str);
67 }
68 return map;
69}
70
71void sorta_shuffle(void *arr, size_t n, size_t size, size_t sections)
72{

Callers 3

parse_regionFunction · 0.85
validate_detector_flipFunction · 0.85
validate_detectorFunction · 0.85

Calls 2

file_errorFunction · 0.85
fgetlFunction · 0.85

Tested by

no test coverage detected