Skip to content

Commit d374776

Browse files
committed
update downstream example to work with juliac compiled lib
1 parent 208e037 commit d374776

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

compile/downstream/jetreconstruction_test.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#include "JetReconstruction.h"
2+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
23
#include "julia_init.h"
4+
#endif
35
#include <assert.h>
46
#include <stdio.h>
57
#include <stdlib.h>
@@ -53,7 +55,9 @@ void printJetsResult(const jetreconstruction_JetsResult *results) {
5355
int main(int argc, char *argv[]) {
5456
clock_t start_time = clock();
5557
int sc = 0;
56-
init_julia(argc, argv);
58+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
59+
init_julia(0, NULL);
60+
#endif
5761
size_t len = 2;
5862
jetreconstruction_PseudoJet particles[2];
5963
sc = jetreconstruction_PseudoJet_init(&particles[0], 0.0, 1.0, 2.0, 3.0);
@@ -78,7 +82,9 @@ int main(int argc, char *argv[]) {
7882

7983
jetreconstruction_JetsResult_free_members(&result);
8084
jetreconstruction_ClusterSequence_free_members(&cluster_seq);
85+
#ifdef JETRECONSTRUCTION_COMPILER_PACKAGECOMPILER
8186
shutdown_julia(0);
87+
#endif
8288

8389
clock_t end_time = clock();
8490
double time_spent = (double)(end_time - start_time) / CLOCKS_PER_SEC;

0 commit comments

Comments
 (0)