mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-27 14:29:43 +00:00
ggml-impl.h: fix build on POWER9 (llama/12855)
error: ISO C++17 does not allow 'register' storage class specifier
This commit is contained in:
parent
6cae79a1d7
commit
c6caf8eef2
@ -362,8 +362,8 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
|
|||||||
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
|
#define GGML_FP32_TO_FP16(x) GGML_COMPUTE_FP32_TO_FP16(x)
|
||||||
|
|
||||||
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
|
static inline float ggml_compute_fp16_to_fp32(ggml_fp16_t h) {
|
||||||
register float f;
|
float f;
|
||||||
register double d;
|
double d;
|
||||||
__asm__(
|
__asm__(
|
||||||
"mtfprd %0,%2\n"
|
"mtfprd %0,%2\n"
|
||||||
"xscvhpdp %0,%0\n"
|
"xscvhpdp %0,%0\n"
|
||||||
@ -375,8 +375,8 @@ GGML_API void ggml_aligned_free(void * ptr, size_t size);
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline ggml_fp16_t ggml_compute_fp32_to_fp16(float f) {
|
static inline ggml_fp16_t ggml_compute_fp32_to_fp16(float f) {
|
||||||
register double d;
|
double d;
|
||||||
register ggml_fp16_t r;
|
ggml_fp16_t r;
|
||||||
__asm__( /* xscvdphp can work on double or single precision */
|
__asm__( /* xscvdphp can work on double or single precision */
|
||||||
"xscvdphp %0,%2\n"
|
"xscvdphp %0,%2\n"
|
||||||
"mffprd %1,%0\n" :
|
"mffprd %1,%0\n" :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user