Revision 22868a4db5f3a3a142ed7bc457fd9fd9ee6bdd76 authored by Prasoon Mishra on 06 March 2024, 21:40:00 UTC, committed by GitHub on 06 March 2024, 21:40:00 UTC
* Add sobel in hexagon_benchmarks app for CMake builds Resolved compilation errors caused by the eliminate interleave pass, which changed the instruction from halide.hexagon.pack_satub.vuh to halide.hexagon.trunc_satub.vuh. The latter is only available in v65 or later. This commit ensures compatibility with v65 and later versions. * Minor fix to address the issue. --------- Co-authored-by: Steven Johnson <srj@google.com>
1 parent 754e6ec
Realization.cpp
#include "Realization.h"
#include "Buffer.h"
#include "Error.h"
namespace Halide {
size_t Realization::size() const {
return images.size();
}
const Buffer<void> &Realization::operator[](size_t x) const {
user_assert(x < images.size()) << "Realization access out of bounds\n";
return images[x];
}
Buffer<void> &Realization::operator[](size_t x) {
user_assert(x < images.size()) << "Realization access out of bounds\n";
return images[x];
}
Realization::Realization(const Buffer<void> &e)
: images({e}) {
}
Realization::Realization(Buffer<void> &&e)
: images({std::move(e)}) {
}
Realization::Realization(const std::vector<Buffer<void>> &e)
: images(e) {
user_assert(!images.empty()) << "Realizations must have at least one element\n";
}
Realization::Realization(std::vector<Buffer<void>> &&e)
: images(std::move(e)) {
user_assert(!images.empty()) << "Realizations must have at least one element\n";
}
int Realization::device_sync(void *ctx) {
for (auto &b : images) {
int result = b.device_sync(ctx);
if (result != 0) {
return result;
}
}
return 0;
}
} // namespace Halide
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...