Переименование типов на на общепринятый формат, отказ от суффикса _t, так как он зарезервирован POSIX

This commit is contained in:
Andrey Pokidov 2025-01-15 23:56:17 +07:00
parent 3805354611
commit 0027924f86
26 changed files with 574 additions and 571 deletions

View file

Internal server error - Personal Git Server: Beyond coding. We Forge.

500

Internal server error

Forgejo version: 11.0.1+gitea-1.22.0

@ -6,12 +6,12 @@
typedef struct {
float r1c1, r1c2;
float r2c1, r2c2;
} bgc_matrix2x2_fp32_t;
} BgcMatrix2x2FP32;
typedef struct {
double r1c1, r1c2;
double r2c1, r2c2;
} bgc_matrix2x2_fp64_t;
} BgcMatrix2x2FP64;
// ================== Matrix2x3 ================= //
@ -19,25 +19,25 @@ typedef struct {
float r1c1, r1c2;
float r2c1, r2c2;
float r3c1, r3c2;
} bgc_matrix2x3_fp32_t;
} BgcMatrix2x3FP32;
typedef struct {
double r1c1, r1c2;
double r2c1, r2c2;
double r3c1, r3c2;
} bgc_matrix2x3_fp64_t;
} BgcMatrix2x3FP64;
// ================== Matrix3x2 ================= //
typedef struct {
float r1c1, r1c2, r1c3;
float r2c1, r2c2, r2c3;
} bgc_matrix3x2_fp32_t;
} BgcMatrix3x2FP32;
typedef struct {
double r1c1, r1c2, r1c3;
double r2c1, r2c2, r2c3;
} bgc_matrix3x2_fp64_t;
} BgcMatrix3x2FP64;
// ================== Matrix3x3 ================= //
@ -45,17 +45,17 @@ typedef struct {
float r1c1, r1c2, r1c3;
float r2c1, r2c2, r2c3;
float r3c1, r3c2, r3c3;
} bgc_matrix3x3_fp32_t;
} BgcMatrix3x3FP32;
typedef struct {
double r1c1, r1c2, r1c3;
double r2c1, r2c2, r2c3;
double r3c1, r3c2, r3c3;
} bgc_matrix3x3_fp64_t;
} BgcMatrix3x3FP64;
// ========== Matrix Product 2x2 at 2x2 ========= //
inline void bgc_matrix_product_2x2_at_2x2_fp32(const bgc_matrix2x2_fp32_t* matrix1, const bgc_matrix2x2_fp32_t* matrix2, bgc_matrix2x2_fp32_t* result)
inline void bgc_matrix_product_2x2_at_2x2_fp32(const BgcMatrix2x2FP32* matrix1, const BgcMatrix2x2FP32* matrix2, BgcMatrix2x2FP32* result)
{
const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -70,7 +70,7 @@ inline void bgc_matrix_product_2x2_at_2x2_fp32(const bgc_matrix2x2_fp32_t* matri
result->r2c2 = r2c2;
}
inline void bgc_matrix_product_2x2_at_2x2_fp64(const bgc_matrix2x2_fp64_t* matrix1, const bgc_matrix2x2_fp64_t* matrix2, bgc_matrix2x2_fp64_t* result)
inline void bgc_matrix_product_2x2_at_2x2_fp64(const BgcMatrix2x2FP64* matrix1, const BgcMatrix2x2FP64* matrix2, BgcMatrix2x2FP64* result)
{
const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
@ -87,44 +87,44 @@ inline void bgc_matrix_product_2x2_at_2x2_fp64(const bgc_matrix2x2_fp64_t* matri
// ========== Matrix Product 2x2 at 3x2 ========= //
void bgc_matrix_product_2x2_at_3x2_fp32(const bgc_matrix2x2_fp32_t* matrix1, const bgc_matrix3x2_fp32_t* matrix2, bgc_matrix3x2_fp32_t* result);
void bgc_matrix_product_2x2_at_3x2_fp32(const BgcMatrix2x2FP32* matrix1, const BgcMatrix3x2FP32* matrix2, BgcMatrix3x2FP32* result);
void bgc_matrix_product_2x2_at_3x2_fp64(const bgc_matrix2x2_fp64_t* matrix1, const bgc_matrix3x2_fp64_t* matrix2, bgc_matrix3x2_fp64_t* result);
void bgc_matrix_product_2x2_at_3x2_fp64(const BgcMatrix2x2FP64* matrix1, const BgcMatrix3x2FP64* matrix2, BgcMatrix3x2FP64* result);
// ========== Matrix Product 2x3 at 2x2 ========= //
void bgc_matrix_product_2x3_at_2x2_fp32(const bgc_matrix2x3_fp32_t* matrix1, const bgc_matrix2x2_fp32_t* matrix2, bgc_matrix2x3_fp32_t* result);
void bgc_matrix_product_2x3_at_2x2_fp32(const BgcMatrix2x3FP32* matrix1, const BgcMatrix2x2FP32* matrix2, BgcMatrix2x3FP32* result);
void bgc_matrix_product_2x3_at_2x2_fp64(const bgc_matrix2x3_fp64_t* matrix1, const bgc_matrix2x2_fp64_t* matrix2, bgc_matrix2x3_fp64_t* result);
void bgc_matrix_product_2x3_at_2x2_fp64(const BgcMatrix2x3FP64* matrix1, const BgcMatrix2x2FP64* matrix2, BgcMatrix2x3FP64* result);
// ========== Matrix Product 2x3 at 3x2 ========= //
void bgc_matrix_product_2x3_at_3x2_fp32(const bgc_matrix2x3_fp32_t* matrix1, const bgc_matrix3x2_fp32_t* matrix2, bgc_matrix3x3_fp32_t* result);
void bgc_matrix_product_2x3_at_3x2_fp32(const BgcMatrix2x3FP32* matrix1, const BgcMatrix3x2FP32* matrix2, BgcMatrix3x3FP32* result);