cpp : more robust code and added more documentation
This commit is contained in:
@ -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 });
|
||||
|
Reference in New Issue
Block a user