gem-graph-server/include/base.h

66 lines
2.6 KiB
C
Raw Normal View History

2021-06-08 20:15:47 +02:00
//=-------------------------------------------------------------------------=//
2021-06-09 14:40:23 +02:00
// base definition //
2021-06-08 20:15:47 +02:00
// //
// Copyright © 2021 Libre en Communs (contact@a-lec.org) //
// Copyright © 2021 Adrien Bourmault (neox@a-lec.org) //
2021-06-08 20:15:47 +02:00
// //
// This file is part of gem-graph. //
// //
// This program is free software: you can redistribute it and/or modify //
// it under the terms of the GNU Affero General Public License as //
// published by the Free Software Foundation, either version 3 of the //
// License, or (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU Affero General Public License for more details. //
// //
// You should have received a copy of the GNU Affero General Public License //
// along with this program. If not, see <https://www.gnu.org/licenses/>. //
//=-------------------------------------------------------------------------=//
2021-06-16 19:44:48 +02:00
#include <sys/param.h>
2021-06-08 20:15:47 +02:00
#include <stdbool.h>
2024-03-13 19:10:10 +01:00
#include <assert.h>
2021-06-09 14:40:23 +02:00
#include <unistd.h>
#include <malloc.h>
2021-06-11 15:11:06 +02:00
#include <string.h>
2021-06-11 17:39:34 +02:00
#include <stdlib.h>
2024-03-20 22:59:00 +01:00
#include <time.h>
2021-06-16 19:44:48 +02:00
#include <errno.h>
#include <stdio.h>
2021-07-09 20:34:32 +02:00
#include <netinet/in.h>
2024-03-15 22:10:10 +01:00
#include <omp.h>
2024-03-20 22:59:00 +01:00
#include <math.h>
2021-06-09 14:40:23 +02:00
#define BASE_H
2021-06-08 20:15:47 +02:00
/* -------------------------------------------------------------------------- */
2024-03-13 19:10:10 +01:00
#define LOGMSG "<%s:%s()>"
2024-03-15 22:10:10 +01:00
#define printlog(FORMAT, ...) printf("\e[0;36m" LOGMSG "\e[0m" " " FORMAT \
"\e[0m", __FILE__,__func__, ##__VA_ARGS__)
#define printerr(FORMAT,...) fprintf(stderr, "\e[0;31m" LOGMSG "\e[0m" " " \
FORMAT "\e[0m", __FILE__,__func__, \
##__VA_ARGS__)
#define LEN(x) (sizeof(x) / sizeof((x)[0]))
/* -------------------------------------------------------------------------- */
2024-03-13 19:10:10 +01:00
struct parameters_t
{
char *configDir;
char *userDir;
char *modelDir;
};
2021-06-16 13:06:23 +02:00
2024-03-15 22:10:10 +01:00