27 #include "../common.hpp"
32 #include "../types/ensemble.hpp"
235 struct event_data_size
237 int num_ints() {
return -1; }
238 int num_doubles() {
return -1; }
242 {
int num_ints() {
return 1; }
int num_doubles() {
return 1; } };
244 {
int num_ints() {
return 1; }
int num_doubles() {
return 2; } };
246 {
int num_ints() {
return 1; }
int num_doubles() {
return 1; } };
248 {
int num_ints() {
return 1; }
int num_doubles() {
return 2; } };
250 {
int num_ints() {
return 1; }
int num_doubles() {
return 2; } };
252 {
int num_ints() {
return 1; }
int num_doubles() {
return 2; } };
254 {
int num_ints() {
return 2; }
int num_doubles() {
return 2; } };
262 template<
typename L,
typename T1>
263 GENERIC PTR_T(
SCALAR(T1)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1){
264 return l.write(recid, T, sys, v1);
267 template<
typename L,
typename T1,
typename T2>
268 GENERIC PTR_T(
SCALAR(T2)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2)
270 return l.write(recid, T, sys, v1, v2);
273 template<
typename L,
typename T1,
typename T2,
typename T3>
274 GENERIC PTR_T(
SCALAR(T3)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3)
276 return l.write(recid, T, sys, v1, v2, v3);
279 template<
typename L,
typename T1,
typename T2,
typename T3,
typename T4>
280 GENERIC PTR_T(
SCALAR(T4)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4)
282 return l.write(recid, T, sys, v1, v2, v3, v4);
285 template<
typename L,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
286 GENERIC PTR_T(
SCALAR(T5)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5)
288 return l.write(recid, T, sys, v1, v2, v3, v4, v5);
291 template<
typename L,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6>
292 GENERIC PTR_T(
SCALAR(T6)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6)
294 return l.write(recid, T, sys, v1, v2, v3, v4, v5, v6);
297 template<
typename L,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7>
298 GENERIC PTR_T(
SCALAR(T7)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7)
300 return l.write(recid, T, sys, v1, v2, v3, v4, v5, v6, v7);
303 template<
typename L,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
typename T6,
typename T7,
typename T8>
304 GENERIC PTR_T(
SCALAR(T8)) event(
L &l, const
int recid, const
double T, const
int sys, const T1 &v1, const T2 &v2, const T3 &v3, const T4 &v4, const T5 &v5, const T6 &v6, const T7 &v7, const T8 &v8)
306 return l.write(recid, T, sys, v1, v2, v3, v4, v5, v6, v7, v8);
316 body *bodies = swarm::log::event(l,
EVT_SNAPSHOT, sys.time(), sys.id()
317 , sys.state() , sys.nbod(), gpulog::array<body>(sys.nbod()));
321 for(
int bod=0; bod < sys.nbod(); bod++)
323 bodies[bod].set(bod,sys[bod]);
340 for(
int sys = 0; sys < ens.
nsys(); sys++)
350 for(
int sys = 0; sys < ens.
nsys(); sys++)
352 if(ens[sys].is_enabled())