just msqrt

This commit is contained in:
Iveta 2024-12-11 20:53:21 +02:00
parent 1f9c2f67f4
commit 49d32f7da7
2 changed files with 2 additions and 22 deletions

View File

@ -2,12 +2,8 @@
#include <sta/math/utils.hpp> #include <sta/math/utils.hpp>
#include <cstdint> #include <cstdint>
#include <cmath> #include <cmath>
#include <iostream>
#ifdef STA_CORE
#include <sta/debug/debug.hpp> #include <sta/debug/debug.hpp>
#include <sta/debug/assert.hpp> #include <sta/debug/assert.hpp>
#endif
namespace sta{ namespace sta{

View File

@ -3,25 +3,9 @@
#include <cstdint> #include <cstdint>
#include <cstring> #include <cstring>
#include <iostream> #include <iostream>
#ifdef STA_CORE
#include <sta/debug/debug.hpp> #include <sta/debug/debug.hpp>
#include <sta/debug/assert.hpp> #include <sta/debug/assert.hpp>
#else
void STA_ASSERT_MSG(int cond, const char * msg) {
if(!cond) {
printf("%s\n", msg);
std::exit(1);
}
}
#define STA_DEBUG_PRINT printf
#define STA_DEBUG_PRINTF printf
void STA_DEBUG_PRINTLN(const char * msg) {
printf("%s\n", msg);
}
#endif
namespace sta namespace sta
{ {
namespace math { namespace math {
@ -432,7 +416,7 @@ void matrix::show_serial() {
for(uint8_t c = 0; c < get_cols(); c++) { for(uint8_t c = 0; c < get_cols(); c++) {
STA_DEBUG_PRINT("| "); STA_DEBUG_PRINT("| ");
STA_DEBUG_PRINTF("%f", operator()(r, c)); STA_DEBUG_PRINT(operator()(r, c));
if(c == get_cols() - 1) { if(c == get_cols() - 1) {
STA_DEBUG_PRINTLN(" |"); STA_DEBUG_PRINTLN(" |");
} else { } else {
@ -448,7 +432,7 @@ void matrix::show_serial() {
void matrix::show_shape() { void matrix::show_shape() {
STA_DEBUG_PRINTF("Matrix shape: (%d x %d)\n", get_rows(), get_cols()); STA_DEBUG_PRINTF("Matrix shape: (%d x %d)", get_rows(), get_cols());
} }