2024-08-29 07:01:51 +00:00
|
|
|
#include "qfloat16.h"
|
|
|
|
#include "gen_qfloat16.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-29 07:01:51 +00:00
|
|
|
|
|
|
|
qfloat16* qfloat16_new() {
|
|
|
|
return new qfloat16();
|
|
|
|
}
|
|
|
|
|
|
|
|
qfloat16* qfloat16_new2(float f) {
|
|
|
|
return new qfloat16(static_cast<float>(f));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool qfloat16_IsInf(const qfloat16* self) {
|
|
|
|
return self->isInf();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool qfloat16_IsNaN(const qfloat16* self) {
|
|
|
|
return self->isNaN();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool qfloat16_IsFinite(const qfloat16* self) {
|
|
|
|
return self->isFinite();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int qfloat16_FpClassify(const qfloat16* self) {
|
|
|
|
return self->fpClassify();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool qfloat16_IsNormal(const qfloat16* self) {
|
|
|
|
return self->isNormal();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void qfloat16_Delete(qfloat16* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|