Skip to content

Commit 8711bf0

Browse files
committed
add compatibility with juliac compiled lib
1 parent cae9829 commit 8711bf0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cjetreconstruction/src/cjetreconstruction-finder.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@
2727
#include "HepMC3/ReaderAscii.h"
2828

2929
#include "cjetreconstruction-utils.hh"
30+
31+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
3032
extern "C" {
3133
#include "julia_init.h"
3234
}
35+
#endif
36+
3337
using namespace std;
3438
using namespace popl;
3539
using Time = std::chrono::high_resolution_clock;
@@ -57,7 +61,10 @@ run_clustering(std::vector<jetreconstruction_PseudoJet> input_particles,
5761
}
5862

5963
int main(int argc, char *argv[]) {
64+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
6065
init_julia(0, nullptr);
66+
#endif
67+
6168
// Default values
6269
int maxevents = -1;
6370
int skip_events = 0;
@@ -247,6 +254,9 @@ int main(int argc, char *argv[]) {
247254
std::cout << "Total time " << time_total << " us" << endl;
248255
std::cout << "Time per event " << mean_per_event << " +- " << sigma_per_event << " us" << endl;
249256
std::cout << "Lowest time per event " << time_lowest << " us" << endl;
257+
258+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
250259
shutdown_julia(0);
260+
#endif
251261
return 0;
252262
}

0 commit comments

Comments
 (0)