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
Raw File
RemoveExternLoops.cpp
#include "RemoveExternLoops.h"
#include "IRMutator.h"

namespace Halide {
namespace Internal {

namespace {

class RemoveExternLoops : public IRMutator {
private:
    using IRMutator::visit;

    Stmt visit(const For *op) override {
        if (op->for_type != ForType::Extern) {
            return IRMutator::visit(op);
        }
        // Replace the for with its first iteration (implemented with a let).
        return LetStmt::make(op->name, op->min, mutate(op->body));
    }
};

}  // namespace

Stmt remove_extern_loops(const Stmt &s) {
    return RemoveExternLoops().mutate(s);
}

}  // namespace Internal
}  // namespace Halide
back to top