Добавление новых функций, возвращение функций subtract_scaled
This commit is contained in:
parent
727961ad98
commit
1075624d05
26 changed files with 836 additions and 292 deletions
|
|
@ -497,7 +497,7 @@ inline void bgc_fp64_matrix2x2_add(BGC_FP64_Matrix2x2* sum, const BGC_FP64_Matri
|
|||
sum->r2c2 = matrix1->r2c2 + matrix2->r2c2;
|
||||
}
|
||||
|
||||
// ================= Add scaled ================= //
|
||||
// ================= Add Scaled ================= //
|
||||
|
||||
inline void bgc_fp32_matrix2x2_add_scaled(BGC_FP32_Matrix2x2* sum, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale)
|
||||
{
|
||||
|
|
@ -537,6 +537,26 @@ inline void bgc_fp64_matrix2x2_subtract(BGC_FP64_Matrix2x2* difference, const BG
|
|||
difference->r2c2 = minuend->r2c2 - subtrahend->r2c2;
|
||||
}
|
||||
|
||||
// ============== Subtract Scaled =============== //
|
||||
|
||||
inline void bgc_fp32_matrix2x2_subtract_scaled(BGC_FP32_Matrix2x2* difference, const BGC_FP32_Matrix2x2* basic_matrix, const BGC_FP32_Matrix2x2* scalable_matrix, const float scale)
|
||||
{
|
||||
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
|
||||
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
|
||||
|
||||
difference->r2c1 = basic_matrix->r2c1 - scalable_matrix->r2c1 * scale;
|
||||
difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x2_subtract_scaled(BGC_FP64_Matrix2x2* difference, const BGC_FP64_Matrix2x2* basic_matrix, const BGC_FP64_Matrix2x2* scalable_matrix, const double scale)
|
||||
{
|
||||
difference->r1c1 = basic_matrix->r1c1 - scalable_matrix->r1c1 * scale;
|
||||
difference->r1c2 = basic_matrix->r1c2 - scalable_matrix->r1c2 * scale;
|
||||
|
||||
difference->r2c1 = basic_matrix->r2c1 - scalable_matrix->r2c1 * scale;
|
||||
difference->r2c2 = basic_matrix->r2c2 - scalable_matrix->r2c2 * scale;
|
||||
}
|
||||
|
||||
// ================== Multiply ================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x2_multiply_by_real(BGC_FP32_Matrix2x2* product, const BGC_FP32_Matrix2x2* multiplicand, const float multiplier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue