mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
CUDA so fast
This commit is contained in:
16
src/utils.c
16
src/utils.c
@ -7,6 +7,19 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
void pm(int M, int N, float *A)
|
||||
{
|
||||
int i,j;
|
||||
for(i =0 ; i < M; ++i){
|
||||
for(j = 0; j < N; ++j){
|
||||
printf("%10.6f, ", A[i*N+j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
char *find_replace(char *str, char *orig, char *rep)
|
||||
{
|
||||
static char buffer[4096];
|
||||
@ -44,10 +57,9 @@ void top_k(float *a, int n, int k, int *index)
|
||||
}
|
||||
}
|
||||
|
||||
void error(char *s)
|
||||
void error(const char *s)
|
||||
{
|
||||
perror(s);
|
||||
//fprintf(stderr, "Error: %s\n", s);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user