2024-10-16 18:07:56 +13:00
|
|
|
#include <qfloat16.h>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include "gen_qfloat16.h"
|
2024-12-11 19:55:47 +13:00
|
|
|
|
2025-01-07 11:30:33 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
2024-12-11 19:55:47 +13:00
|
|
|
#endif
|
2024-08-29 19:01:51 +12:00
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
qfloat16* qfloat16_new() {
|
|
|
|
return new qfloat16();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-12-07 17:15:57 +13:00
|
|
|
qfloat16* qfloat16_new2(float f) {
|
|
|
|
return new qfloat16(static_cast<float>(f));
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool qfloat16_IsInf(const qfloat16* self) {
|
|
|
|
return self->isInf();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool qfloat16_IsNaN(const qfloat16* self) {
|
|
|
|
return self->isNaN();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool qfloat16_IsFinite(const qfloat16* self) {
|
|
|
|
return self->isFinite();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
int qfloat16_FpClassify(const qfloat16* self) {
|
|
|
|
return self->fpClassify();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool qfloat16_IsNormal(const qfloat16* self) {
|
|
|
|
return self->isNormal();
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|
2024-11-19 19:29:06 +13:00
|
|
|
void qfloat16_Delete(qfloat16* self, bool isSubclass) {
|
|
|
|
if (isSubclass) {
|
|
|
|
delete dynamic_cast<qfloat16*>( self );
|
|
|
|
} else {
|
|
|
|
delete self;
|
|
|
|
}
|
2024-08-29 19:01:51 +12:00
|
|
|
}
|
|
|
|
|