InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
hstack.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_HSTACK_H_
2#define INFINI_OPS_BASE_HSTACK_H_
3
4#include <vector>
5
6#include "operator.h"
7
8namespace infini::ops {
9
10class Hstack : public Operator<Hstack> {
11 public:
12 Hstack(const std::vector<Tensor> tensors, Tensor out)
13 : out_shape_{out.shape()},
14 out_strides_{out.strides()},
15 out_type_{out.dtype()},
16 tensors_{tensors},
17 device_index_{out.device().index()} {}
18
19 virtual void operator()(const std::vector<Tensor> tensors,
20 Tensor out) const = 0;
21
22 protected:
23 Tensor::Shape out_shape_;
24
25 Tensor::Strides out_strides_;
26
27 DataType out_type_;
28
29 std::vector<Tensor> tensors_{};
30
32};
33
34} // namespace infini::ops
35
36#endif
Definition hstack.h:10
int device_index_
Definition hstack.h:31
DataType out_type_
Definition hstack.h:27
Hstack(const std::vector< Tensor > tensors, Tensor out)
Definition hstack.h:12
Tensor::Shape out_shape_
Definition hstack.h:23
virtual void operator()(const std::vector< Tensor > tensors, Tensor out) const =0
std::vector< Tensor > tensors_
Definition hstack.h:29
Tensor::Strides out_strides_
Definition hstack.h:25
Definition generated/include/operator.h:282
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8