Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,16 @@ struct Type {
return type != other.type || (code() == Handle && !same_handle_type(other));
}

/** Compare two types for equality */
bool operator==(const halide_type_t &other) const {
return type == other;
}

/** Compare two types for inequality */
bool operator!=(const halide_type_t &other) const {
return type != other;
}

/** Compare ordering of two types so they can be used in certain containers and algorithms */
bool operator<(const Type &other) const {
if (type < other.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/HalideBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct DeviceRefCount {
template<typename T = void, int D = 4>
class Buffer {
/** The underlying halide_buffer_t */
halide_buffer_t buf = {0};
halide_buffer_t buf = {};

/** Some in-class storage for shape of the dimensions. */
halide_dimension_t shape[D];
Expand Down