somehow i managed to improve the build system
to become even more awesome
This commit is contained in:
9
main.c
9
main.c
@@ -1,4 +1,4 @@
|
||||
#include "cythoned/bridge.h"
|
||||
#include "build/bridge.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -17,15 +17,16 @@
|
||||
#define TAG_INSTR 9
|
||||
#define TAG_TERMT 10
|
||||
|
||||
#define COMM 5
|
||||
#define ITER 500
|
||||
#define COMM 25
|
||||
#define ITER 100
|
||||
#define BS 32
|
||||
#define EMB 32
|
||||
#define WIN 2
|
||||
#define FLPC 1
|
||||
|
||||
#define in_range(i, x) (size_t i = 0; i < (x); i++)
|
||||
// I am honestly VERY sorry for this but power corrupts even the best of us
|
||||
// I am honestly VERY sorry for this
|
||||
// but the power of macros corrupts even the best of us
|
||||
|
||||
#define INFO_PRINTF(fmt, ...) \
|
||||
do { fprintf(stderr, fmt, __VA_ARGS__); } while(0)
|
||||
|
||||
17
meson.build
17
meson.build
@@ -11,9 +11,18 @@ numpy_header = include_directories(run_command(
|
||||
'python3', '-c', 'import numpy;print(numpy.get_include())'
|
||||
).stdout().strip())
|
||||
|
||||
executable(
|
||||
'fedavg_mpi', 'main.c', 'cythoned/bridge.c',
|
||||
cython = find_program('cython')
|
||||
bridge = custom_target('bridge',
|
||||
output: ['bridge.c', 'bridge.h'],
|
||||
input: 'bridge.pyx',
|
||||
command: [cython, '-3', '@INPUT@', '-o', 'bridge.c'])
|
||||
|
||||
executable('fedavg_mpi',
|
||||
'main.c', bridge,
|
||||
dependencies: [mpi, python],
|
||||
include_directories: numpy_header,
|
||||
link_args: '-Wl,-w'
|
||||
)
|
||||
link_args: '-Wl,-w')
|
||||
|
||||
run_command('cp',
|
||||
meson.current_build_dir() + 'compile_commands.json',
|
||||
meson.current_source_dir())
|
||||
|
||||
Reference in New Issue
Block a user