Merge pull request #36 from jepler/convolve-optimize

filter_convolve: fix build error
This commit is contained in:
Zoltán Vörös 2020-02-12 18:24:26 +01:00 committed by GitHub
commit f2aaab84cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,15 +69,10 @@ mp_obj_t filter_convolve(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_a
int top_n = MIN(len_c, len_a - k);
int bot_n = MAX(-k, 0);
for(int n=bot_n; n<top_n; n++) {
mp_float_t* a_ptr = a_items + bot_n + k;
mp_float_t* a_end = a_ptr + (top_n - bot_n);
mp_float_t* c_ptr = c_items + len_c - bot_n - 1;
for(; a_ptr != a_end;) {
int idx_c = len_c - n - 1;
int idx_a = n+k;
mp_float_t ai = ndarray_get_float_value(a->array->items, a->array->typecode, idx_a);
mp_float_t ci = ndarray_get_float_value(c->array->items, c->array->typecode, idx_c);
}
accum += ai * ci;
}
*outptr++ = accum;