Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
8758aaf5
Commit
8758aaf5
authored
Nov 23, 2018
by
Loic Hausammann
Browse files
Logger can be independant of python
parent
482c49e8
Changes
5
Hide whitespace changes
Inline
Side-by-side
logger/Makefile.am
View file @
8758aaf5
...
...
@@ -42,8 +42,7 @@ lib_LTLIBRARIES = libswiftlogger.la
include_HEADERS
=
header.h io.h particle.h timeline.h logger_tools.h
# Common source files
AM_SOURCES
=
header.c io.c logger_loader.c particle.c
\
timeline.c
AM_SOURCES
=
header.c io.c particle.c timeline.c
if
HAVEPYTHON
AM_SOURCES
+=
logger_loader.c
endif
...
...
logger/io.c
View file @
8758aaf5
#include
"io.h"
#include
"header.h"
#include
"logger_tools.h"
/* file size */
#include
<sys/stat.h>
/* mapping */
#include
<sys/mman.h>
/* open */
#include
<fcntl.h>
#include
<unistd.h>
#include
"io.h"
#include
"header.h"
#include
"logger_tools.h"
int
io_get_file_size
(
int
fd
,
size_t
*
size
)
{
struct
stat
s
;
...
...
logger/logger_tools.h
View file @
8758aaf5
...
...
@@ -11,6 +11,7 @@
#include
<errno.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#define STRING_SIZE 200
...
...
logger/particle.c
View file @
8758aaf5
...
...
@@ -6,6 +6,7 @@
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdint.h>
void
particle_print
(
const
struct
particle
*
p
)
{
printf
(
"ID: %lu
\n
"
,
p
->
id
);
...
...
logger/timeline.c
View file @
8758aaf5
...
...
@@ -5,7 +5,7 @@ double time_convert_to_double(const integertime_t ti, const double timeBase) {
return
ti
*
timeBase
;
// should add timebegin
}
integertime_t
time_convert_to_integer
(
const
double
_t
ti
,
integertime_t
time_convert_to_integer
(
const
double
ti
,
const
double
timeBase
)
{
return
ti
/
timeBase
;
// should add timebegin
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment