Skip to content

Commit

Permalink
FIX: Use memcpy instead of explicit element-by-element copy
Browse files Browse the repository at this point in the history
Original merge request: xiph/rnnoise#191
  • Loading branch information
Ameobea authored and Hartmnt committed Mar 21, 2024
1 parent 9aa183c commit 345fe06
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ void renamenoise_compute_gru(const ReNameNoiseGRULayer *gru, float *state, const
}
h[i] = z[i] * state[i] + (1 - z[i]) * sum;
}
for (i = 0; i < N; i++) {
state[i] = h[i];
}
memcpy((void *) state, (void *) h, N * sizeof(float));
}

#define RENAMENOISE_INPUT_SIZE 42
Expand Down

0 comments on commit 345fe06

Please sign in to comment.