cpp : more robust code and added more documentation

This commit is contained in:
saundersp
2024-04-27 21:08:33 +02:00
parent 45f0f6ab8e
commit c7d21e1014
10 changed files with 355 additions and 319 deletions

View File

@ -11,7 +11,7 @@ void test_working(const size_t& length) noexcept {
const size_t size = length * sizeof(size_t);
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
printf("Estimating memory footprint at : %s\n", format_byte_size(2 * size).c_str());
#endif
np::Array<size_t> x = np::empty<size_t>({ length }), y = np::empty<size_t>({ length });
@ -53,7 +53,7 @@ void test_working_2d(const size_t& N1, const size_t& N2) noexcept {
const size_t size = length * sizeof(size_t);
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
printf("Estimating memory footprint at : %s\n", format_byte_size(2 * size).c_str());
#endif
np::Array<size_t> x = np::empty<size_t>({ length }), y = np::empty<size_t>({ length });
@ -96,7 +96,7 @@ void test_working_3d(const size_t& N1, const size_t& N2, const size_t& N3) noexc
const size_t size = length * sizeof(size_t);
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
printf("Estimating memory footprint at : %s\n", format_byte_size(2 * size).c_str());
#endif
np::Array<size_t> x = np::empty<size_t>({ length }), y = np::empty<size_t>({ length });