Skip to content
Browse files

eml_net: Avoid variable shadowing

Found by cppcheck
  • Loading branch information...
jonnor committed Feb 23, 2019
1 parent 67f5997 commit 6f54d16d6597b77c945879f33648802263b0d45f
Showing with 2 additions and 2 deletions.
  1. +2 −2 emlearn/eml_net.h
@@ -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++) {

0 comments on commit 6f54d16

Please sign in to comment.
You can’t perform that action at this time.