Revision 9a94756d01d9071ff1610bfc4cb170bd47f701a8 authored by Alexander Root on 21 July 2022, 15:01:16 UTC, committed by GitHub on 21 July 2022, 15:01:16 UTC
* use pmaddubsw 8-bit horizontal widening adds * add SSE3 versions too * add pmaddubsw tests
1 parent 967c3bf
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 ...