Skip to content

Commit

Permalink
Remove tabs, remove dead pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
thesps committed Jun 11, 2020
1 parent 30e803c commit 66c2df3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hls4ml/templates/vivado/nnet_utils/nnet_activation.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,17 @@ void softmax(data_T data[CONFIG_T::n_in], res_T res[CONFIG_T::n_in]){
bool initialized = false;
typename CONFIG_T::exp_table_t exp_table[CONFIG_T::table_size];
typename CONFIG_T::inv_table_t invert_table[CONFIG_T::table_size];
#pragma HLS resource variable=exp_table core=ROM_nP_BRAM
#else
static bool initialized = false;
static typename CONFIG_T::exp_table_t exp_table[CONFIG_T::table_size];
static typename CONFIG_T::inv_table_t invert_table[CONFIG_T::table_size];

#endif
if (!initialized) {
// Note we are exponentiating the inputs, which have type data_T
init_exp_table<data_T, CONFIG_T>(exp_table);
// Note we are inverting the exponentials, which have type exp_table_t
init_invert_table<typename CONFIG_T::exp_table_t, CONFIG_T>(invert_table);
// Note we are exponentiating the inputs, which have type data_T
init_exp_table<data_T, CONFIG_T>(exp_table);
// Note we are inverting the exponentials, which have type exp_table_t
init_invert_table<typename CONFIG_T::exp_table_t, CONFIG_T>(invert_table);
initialized = true;
}

Expand Down

0 comments on commit 66c2df3

Please sign in to comment.