cpp : fixed a few typos
This commit is contained in:
parent
e40bbb999f
commit
c048b3ca90
@ -9,7 +9,7 @@ template <typename T>
|
||||
bool unit_test_cpu_vs_gpu(const np::Array<T>& cpu, const np::Array<T>& gpu) noexcept {
|
||||
if (cpu.shape != gpu.shape) {
|
||||
#if __DEBUG
|
||||
fprintf(stderr, "Inequal shape !\n");
|
||||
fprintf(stderr, "Unequal shape !\n");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
@ -32,7 +32,7 @@ template <typename T>
|
||||
bool unit_test_argsort_2d(const np::Array<T>& a, const np::Array<uint16_t>& indices) noexcept {
|
||||
if (a.shape != indices.shape) {
|
||||
#if __DEBUG
|
||||
fprintf(stderr, "Inequal shape !\n");
|
||||
fprintf(stderr, "Unequal shape !\n");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
@ -60,8 +60,8 @@ T benchmark_function(const char* step_name, const F& fnc, Args &&...args) noexce
|
||||
#endif
|
||||
const std::chrono::system_clock::time_point start = perf_counter_ns();
|
||||
const T res = fnc(std::forward<Args>(args)...);
|
||||
const long long timespent = duration_ns(perf_counter_ns() - start);
|
||||
printf("| %-49s | %18s | %-29s |\n", step_name, thousand_sep(timespent).c_str(), format_time_ns(timespent).c_str());
|
||||
const long long time_spent = duration_ns(perf_counter_ns() - start);
|
||||
printf("| %-49s | %18s | %-29s |\n", step_name, thousand_sep(time_spent).c_str(), format_time_ns(time_spent).c_str());
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -73,8 +73,8 @@ void benchmark_function_void(const char* step_name, const F& fnc, Args &&...args
|
||||
#endif
|
||||
const std::chrono::system_clock::time_point start = perf_counter_ns();
|
||||
fnc(std::forward<Args>(args)...);
|
||||
const long long timespent = duration_ns(perf_counter_ns() - start);
|
||||
printf("| %-49s | %18s | %-29s |\n", step_name, thousand_sep(timespent).c_str(), format_time_ns(timespent).c_str());
|
||||
const long long time_spent = duration_ns(perf_counter_ns() - start);
|
||||
printf("| %-49s | %18s | %-29s |\n", step_name, thousand_sep(time_spent).c_str(), format_time_ns(time_spent).c_str());
|
||||
}
|
||||
|
||||
template <typename T, typename F, typename... Args>
|
||||
|
@ -534,7 +534,7 @@ namespace np {
|
||||
// bool Array<T>::operator==(const Array& other) const noexcept {
|
||||
// if (shape != other.shape)
|
||||
// return false;
|
||||
// const size_t lenght = np::prod(shape);
|
||||
// const size_t length = np::prod(shape);
|
||||
// for(size_t i = 0; i < length; ++i)
|
||||
// if (data[i] != other[i])
|
||||
// return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user