Skip to content

Commit

Permalink
protect top-level function as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jmduarte committed Mar 21, 2024
1 parent 621ad5a commit f3e3cb2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
4 changes: 3 additions & 1 deletion AXOL1TL_v1/NN/GTADModel_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "GTADModel_v1.h"
#include "parameters.h"

using namespace hls4ml_axol1tl_v1;
namespace hls4ml_axol1tl_v1 {

void GTADModel_v1(
input_t input_1[N_INPUT_1_1],
Expand Down Expand Up @@ -76,4 +76,6 @@ void GTADModel_v1(

nnet::linear<layer6_t, result_t, linear_config7>(layer6_out, layer7_out); // mu_quantized_bits

} // hls4ml_axol1tl_v1

}
4 changes: 4 additions & 0 deletions AXOL1TL_v1/NN/GTADModel_v1.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@

#include "defines.h"

namespace hls4ml_axol1tl_v1 {

// Prototype of top level function for C-synthesis
void GTADModel_v1(
hls4ml_axol1tl_v1::input_t input_1[hls4ml_axol1tl_v1::N_INPUT_1_1],
hls4ml_axol1tl_v1::result_t layer7_out[hls4ml_axol1tl_v1::N_LAYER_6]
);

} // namespace hls4ml_axol1tl_v1

#endif
3 changes: 2 additions & 1 deletion AXOL1TL_v3/NN/GTADModel_v3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

//from https://gitlab.cern.ch/ssummers/run3_ugt_ml/-/blob/axol1tl_v3/ugt_hls/src/anomaly_detection/Axol1tl_v3.h

using namespace hls4ml_axol1tl_v3;
namespace hls4ml_axol1tl_v3 {

void GTADModel_v3(
input_t input_3[N_INPUT_1_1],
Expand Down Expand Up @@ -84,5 +84,6 @@ void GTADModel_v3(

nnet::linear<layer6_t, result_t, linear_config7>(layer6_out, layer7_out); // mu_quantized_bits

} // namespace hls4ml_axol1tl_v3

}
4 changes: 4 additions & 0 deletions AXOL1TL_v3/NN/GTADModel_v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@

#include "defines.h"

namespace hls4ml_axol1tl_v3 {

//from https://gitlab.cern.ch/ssummers/run3_ugt_ml/-/blob/axol1tl_v3/ugt_hls/src/anomaly_detection/Axol1tl_v3.h
void GTADModel_v3(
hls4ml_axol1tl_v3::input_t input_3[hls4ml_axol1tl_v3::N_INPUT_1_1],
hls4ml_axol1tl_v3::result_t layer7_out[hls4ml_axol1tl_v3::N_LAYER_6]
);

} // namespace hls4ml_axol1tl_v3

#endif

0 comments on commit f3e3cb2

Please sign in to comment.