--- /dev/null
+#ifndef _NNC_CORE_BACKEND_INTERPRETER_ELEMENTWISE_IMPL_
+#define _NNC_CORE_BACKEND_INTERPRETER_ELEMENTWISE_IMPL_
+
+#include "nnc/core/linalg/ShapeRange.h"
+#include "nnc/core/linalg/Tensor.h"
+
+#include "interpreter/ops/OperationImpl.h"
+
+namespace nncc
+{
+namespace contrib
+{
+namespace backend
+{
+namespace interpreter
+{
+namespace impl
+{
+
+using nncc::contrib::core::ADT::TensorVariant;
+using nncc::contrib::core::data::Tensor;
+
+template <typename T> class Elementwise : public OperationImpl<T>
+{
+public:
+ explicit Elementwise(const Shape &shape) : _shape(shape){};
+
+ std::vector<TensorVariant> operator()() override
+ {
+ auto res = OperationImpl<T>::allocate_tensor(_shape);
+ Tensor<T> accessor(res);
+
+ elemwise(accessor);
+
+ return {res};
+ }
+
+ virtual T single(const Index &index) = 0;
+
+protected:
+ void elemwise(Tensor<T> &res)
+ {
+ for (auto &idx : ShapeRange(_shape))
+ {
+ res.at(idx) = single(idx);
+ }
+ }
+
+ const Shape &_shape;
+};
+
+} // namespace impl
+} // namespace interpreter
+} // namespace backend
+} // namespace contrib
+} // namespace nncc
+
+#endif //_NNC_CORE_BACKEND_INTERPRETER_ELEMENTWISE_IMPL_