Remove redundant definitions

This commit is contained in:
augustin64 2023-07-12 14:55:59 +02:00
parent 588aec2fb8
commit 4e28c79ce1
3 changed files with 13 additions and 20 deletions

View File

@ -15,7 +15,7 @@
if (network1->var != network2->var) { \
printf_error((char*)"network1->" name " et network2->" name " ne sont pas égaux\n"); \
if (indice != -1) { \
printf(BOLDBLUE "[ INFO_ ]" RESET " indice: %d\n", indice); \
printf(BOLD BLUE "[ INFO_ ]" RESET " indice: %d\n", indice); \
} \
return false; \
}
@ -48,7 +48,7 @@ bool equals_networks(Network* network1, Network* network2) {
checkEquals(kernel[i]->stride, "kernel[i]->stride", i);
checkEquals(kernel[i]->padding, "kernel[i]->padding", i);
if ((!network1->kernel[i]->cnn ^ !network2->kernel[i]->cnn) || (!network1->kernel[i]->nn ^ !network2->kernel[i]->nn)) {
printf(BOLDRED "[ ERROR ]" RESET "network1->kernel[%d] et network1->kernel[%d] diffèrent de type\n", i, i);
printf(BOLD RED "[ ERROR ]" RESET "network1->kernel[%d] et network1->kernel[%d] diffèrent de type\n", i, i);
return false;
}
checkEquals(kernel[i]->linearisation, "kernel[i]->linearisation", i);

View File

@ -5,15 +5,15 @@
#include "include/colors.h"
void printf_error(char* string) {
printf(BOLDRED "[ ERROR ]" RESET " %s", string);
printf(BOLD RED "[ ERROR ]" RESET " %s", string);
}
void printf_warning(char* string) {
printf(BOLDYELLOW "[WARNING]" RESET " %s", string);
printf(BOLD YELLOW "[WARNING]" RESET " %s", string);
}
void printf_info(char* string) {
printf(BOLDBLUE "[ INFO ]" RESET " %s", string);
printf(BOLD BLUE "[ INFO ]" RESET " %s", string);
}
void printf_time(clock_t time) {

View File

@ -13,14 +13,7 @@
#define MAGENTA "\033[35m" /* Magenta */
#define CYAN "\033[36m" /* Cyan */
#define WHITE "\033[37m" /* White */
#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
#define BOLDRED "\033[1m\033[31m" /* Bold Red */
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
#define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */
#define BOLDWHITE "\033[1m\033[37m" /* Bold White */
#define BOLD "\033[1m" /* BOLD */
#ifdef __CUDACC__
extern "C"