bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] int8_t (signed char) not available on some architectures


From: Alejandro C
Subject: [Bug-gsl] int8_t (signed char) not available on some architectures
Date: Mon, 23 Sep 2019 22:12:12 +0200

There are functions that have derivatives for the different types.  For
example

`double gsl_stats_mean(const double data[], const size_t stride, const
size_t n)` (`<gsl/gsl_statistics_double.h>`)

has derivatives such as:

`double gsl_stats_short_mean(const short data[], const size_t stride, const
size_t n)` (`<gsl/gsl_statistics_short.h>`)
`double gsl_stats_uchar_mean(const unsigned char data[], const size_t
stride, const size_t n)` (`<gsl/gsl_statistics_uchar.h>`)
`double gsl_stats_char_mean(const char data[], const size_t stride, const
size_t n)` (`<gsl/gsl_statistics_char.h>`)

With all those functions, one can use any of the types in a x64
environment.  But in aarch64 (Manjaro ARM @ Raspberry Pi 3B+), `char` is
unsigned, so `gsl_stats_uchar_mean()` and `gsl_stats_char_mean()` result in
the same function, and there is no function for `int8_t` (a.k.a. `signed
char`) arrays.

Bug fix:  easy, just replace every appearance of `char` by the more
explicit `signed char`.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]