jacg / explore-g4 Goto Github PK
View Code? Open in Web Editor NEWMonte Carlo simulation of PET scanner design
Monte Carlo simulation of PET scanner design
When run with ctest
, three tests fail with segaults.
While hacking, I normally run the tests like this:
make -j8 && ./tests-trial --list-test-names-only | while read testname; do ./tests-trial "$testname"; done
Pros of the latter
more informative output than ctest
, when tests fail
pretty colours
Cons
In trying to wrap the loop into some sort of script that can be used on CI, the tests start segfaulting.
Conclusions:
We don't have a meaningful status code for test suit success on CI. It always fails.
It's worrying that test success depends on mysterious environment issues.
There are a few aspects to this. Their solutions are probably related.
Take
typedef struct {
unsigned int event_id;
double x;
double y;
double z;
double t;
} hit_t;
This must be accompanied by the 100% deducible-from-the-above boilerplate
HF::CompoundType create_hit_type() {
return {{"event_id", HF::AtomicType<unsigned int>{}},
{"x", HF::AtomicType<double>{}},
{"y", HF::AtomicType<double>{}},
{"z", HF::AtomicType<double>{}},
{"t", HF::AtomicType<double>{}}};
}
HIGHFIVE_REGISTER_TYPE(hit_t, create_hit_type)
This should be generated automatically by machine rather than typed out by humans.
hdf5_io
generic, reusable and C++-friendly.The interface we should be aiming for, looks very roughly like this:
class my_first { public: /*whatever I want*/ private: int foo; double bar; };
class my_other { ... double whatever; T something; };
using my_schema = hdf5_io<"A_Group", {"dataset1", my_first}, {"dataset2", my_other}>;
my_schema my_table;
my_table.open();
my_table.write<"dataset1">(my_first{1, 2.3});
my_table.write<"dataset1">(vector<my_first>{ ... });
my_table.write<"dataset2">(my_other{4.5, T{...}});
my_table.write<"dataset2">(vector<my_other>{ ... });
my_first = my_table.read_one<"dataset1">();
vector<my_first> = my_table.read<"dataset1">();
my_other = my_table.read_one<"dataset2">();
vector<my_other> = my_table.read<"dataset2">();
That is,
We should define the functionality once, and make it generic over arbitrary
groups containing arbitrary datasets.
Let the user write and manipulate C++ classes: we should take care, behind the
scenes, of creation of any C-structs that may be needed in order to talk to
HDF5. (I'm not 100% convinced that the C++ classes can't be used directly and
that C-structs are needed, but if they are, the user shouldn't notice.)
The biggest problem will probably be finding a usable syntax for the
compile-time specification (so, probably template arguments) of the schema and a
way to do the necessary metaprogramming without reducing the Bus Number to zero
(and increasing compile times to infinity).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.