Skip to content

Commit

Permalink
eml_net: Avoid variable shadowing
Browse files Browse the repository at this point in the history
Found by cppcheck
  • Loading branch information
jonnor committed Feb 23, 2019
1 parent 67f5997 commit 6f54d16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions emlearn/eml_net.h
Expand Up @@ -236,8 +236,8 @@ eml_net_infer(EmlNet *model, const float *features, int32_t features_length)
features_length, buffer1, buffer_length));

// Hidden layers
for (int i=1; i<model->n_layers-1; i++) {
const EmlNetLayer *layer = &model->layers[i];
for (int l=1; l<model->n_layers-1; l++) {
const EmlNetLayer *layer = &model->layers[l];
// PERF: avoid copying, swap buffers instead
EML_CHECK_ERROR(eml_net_layer_forward(layer, buffer1, buffer_length, buffer2, buffer_length));
for (int i=0; i<buffer_length; i++) {
Expand Down

0 comments on commit 6f54d16

Please sign in to comment.