mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 15:16:26 +01:00
Remove redundant definitions
This commit is contained in:
parent
588aec2fb8
commit
4e28c79ce1
@ -15,7 +15,7 @@
|
|||||||
if (network1->var != network2->var) { \
|
if (network1->var != network2->var) { \
|
||||||
printf_error((char*)"network1->" name " et network2->" name " ne sont pas égaux\n"); \
|
printf_error((char*)"network1->" name " et network2->" name " ne sont pas égaux\n"); \
|
||||||
if (indice != -1) { \
|
if (indice != -1) { \
|
||||||
printf(BOLDBLUE "[ INFO_ ]" RESET " indice: %d\n", indice); \
|
printf(BOLD BLUE "[ INFO_ ]" RESET " indice: %d\n", indice); \
|
||||||
} \
|
} \
|
||||||
return false; \
|
return false; \
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ bool equals_networks(Network* network1, Network* network2) {
|
|||||||
checkEquals(kernel[i]->stride, "kernel[i]->stride", i);
|
checkEquals(kernel[i]->stride, "kernel[i]->stride", i);
|
||||||
checkEquals(kernel[i]->padding, "kernel[i]->padding", 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)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
checkEquals(kernel[i]->linearisation, "kernel[i]->linearisation", i);
|
checkEquals(kernel[i]->linearisation, "kernel[i]->linearisation", i);
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
#include "include/colors.h"
|
#include "include/colors.h"
|
||||||
|
|
||||||
void printf_error(char* string) {
|
void printf_error(char* string) {
|
||||||
printf(BOLDRED "[ ERROR ]" RESET " %s", string);
|
printf(BOLD RED "[ ERROR ]" RESET " %s", string);
|
||||||
}
|
}
|
||||||
|
|
||||||
void printf_warning(char* string) {
|
void printf_warning(char* string) {
|
||||||
printf(BOLDYELLOW "[WARNING]" RESET " %s", string);
|
printf(BOLD YELLOW "[WARNING]" RESET " %s", string);
|
||||||
}
|
}
|
||||||
|
|
||||||
void printf_info(char* 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) {
|
void printf_time(clock_t time) {
|
||||||
|
@ -5,22 +5,15 @@
|
|||||||
#define DEF_COLORS_H
|
#define DEF_COLORS_H
|
||||||
|
|
||||||
#define RESET "\033[0m"
|
#define RESET "\033[0m"
|
||||||
#define BLACK "\033[30m" /* Black */
|
#define BLACK "\033[30m" /* Black */
|
||||||
#define RED "\033[31m" /* Red */
|
#define RED "\033[31m" /* Red */
|
||||||
#define GREEN "\033[32m" /* Green */
|
#define GREEN "\033[32m" /* Green */
|
||||||
#define YELLOW "\033[33m" /* Yellow */
|
#define YELLOW "\033[33m" /* Yellow */
|
||||||
#define BLUE "\033[34m" /* Blue */
|
#define BLUE "\033[34m" /* Blue */
|
||||||
#define MAGENTA "\033[35m" /* Magenta */
|
#define MAGENTA "\033[35m" /* Magenta */
|
||||||
#define CYAN "\033[36m" /* Cyan */
|
#define CYAN "\033[36m" /* Cyan */
|
||||||
#define WHITE "\033[37m" /* White */
|
#define WHITE "\033[37m" /* White */
|
||||||
#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
|
#define BOLD "\033[1m" /* BOLD */
|
||||||
#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 */
|
|
||||||
|
|
||||||
#ifdef __CUDACC__
|
#ifdef __CUDACC__
|
||||||
extern "C"
|
extern "C"
|
||||||
|
Loading…
Reference in New Issue
Block a user