diff options
Diffstat (limited to 'volk/lib')
-rw-r--r-- | volk/lib/volk_rank_archs.c | 6 | ||||
-rw-r--r-- | volk/lib/volk_rank_archs.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/volk/lib/volk_rank_archs.c b/volk/lib/volk_rank_archs.c index b1a93db26..25ad75cda 100644 --- a/volk/lib/volk_rank_archs.c +++ b/volk/lib/volk_rank_archs.c @@ -1,10 +1,10 @@ #include<volk_rank_archs.h> #include<stdio.h> -unsigned int volk_rank_archs(const int* arch_defs, unsigned int arch) { - int i = 2; +unsigned int volk_rank_archs(const int* arch_defs, unsigned int n_archs, unsigned int arch) { + int i = 1; unsigned int best_val = 0; - for(; i < arch_defs[0] + 1; ++i) { + for(; i < n_archs; ++i) { if((arch_defs[i]&(!arch)) == 0) { best_val = (arch_defs[i] > arch_defs[best_val + 1]) ? i-1 : best_val; } diff --git a/volk/lib/volk_rank_archs.h b/volk/lib/volk_rank_archs.h index 26b9f7503..8fa0631ee 100644 --- a/volk/lib/volk_rank_archs.h +++ b/volk/lib/volk_rank_archs.h @@ -5,7 +5,7 @@ extern "C" { #endif -unsigned int volk_rank_archs(const int* arch_defs, unsigned int arch); +unsigned int volk_rank_archs(const int* arch_defs, unsigned int n_archs, unsigned int arch); #ifdef __cplusplus |