/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd. All Rights Reserved
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#include "OperandContext.h"
+#include "ir/operation/StatelessRandomUniform.h"
#include <cassert>
+#include "ir/OperationVisitor.h"
+
namespace onert
{
-namespace compiler
+namespace ir
{
-
-OperandContext &OperandContext::set(const ir::OperandIndex &id,
- const std::shared_ptr<backend::ITensor> &tensor)
+namespace operation
{
- // Only one tensor for an id
- assert(_tensors.find(id) == _tensors.end());
- _tensors[id] = tensor;
- return (*this);
-}
+void StatelessRandomUniform::accept(OperationVisitor &v) const { v.visit(*this); }
-void OperandContext::iterate(
- const std::function<void(const ir::OperandIndex &, backend::ITensor &)> &fn)
+StatelessRandomUniform::StatelessRandomUniform(const OperandIndexSequence &inputs,
+ const OperandIndexSequence &outputs)
+ : Operation{OperandConstraint::createExact(2u), inputs, outputs}
{
- for (auto &e : _tensors)
- {
- fn(e.first, *e.second);
- }
}
-} // namespace compiler
+} // namespace operation
+} // namespace ir
} // namespace onert