Skip to content

Conversation

@ExplorerRay
Copy link
Owner

As title

@ExplorerRay ExplorerRay merged commit 64ec243 into main Dec 11, 2024
1 check failed
Copy link

@ThreeMonth03 ThreeMonth03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These suggestions may make your code clean.
By the way, maybe you should present making issues, pulling requests and cleaning codes.

Comment on lines 37 to +50
void print_dims_vec(const std::vector<int64_t> &dims) {
std::cout << "[";
for (size_t i = 0; i < dims.size() - 1; ++i) {
std::cout << dims[i] << ", ";
}
std::cout << dims.back() << "]";
std::cout << "[";
for (size_t i = 0; i < dims.size() - 1; ++i) {
std::cout << dims[i] << ", ";
}
std::cout << dims.back() << "]";
}

std::string dims_vec_to_str(const std::vector<int64_t> &dims) {
std::string str = "[";
for (size_t i = 0; i < dims.size() - 1; ++i) {
str += std::to_string(dims[i]) + ", ";
}
str += std::to_string(dims.back()) + "]";
std::string str = "[";
for (size_t i = 0; i < dims.size() - 1; ++i) {
str += std::to_string(dims[i]) + ", ";
}
str += std::to_string(dims.back()) + "]";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using ofstream to prevent programming the similar function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants