forked from jiuyuan/InfiniTensor
style: fix format
This commit is contained in:
parent
87f975d969
commit
2b8823515e
|
@ -7,9 +7,7 @@ namespace infini {
|
|||
*
|
||||
*/
|
||||
class SliceObj : public OperatorObj {
|
||||
template <class T> struct range_t {
|
||||
T start, end, step;
|
||||
};
|
||||
template <class T> struct range_t { T start, end, step; };
|
||||
vector<range_t<int>> axes;
|
||||
|
||||
public:
|
||||
|
|
|
@ -20,12 +20,12 @@ namespace infini {
|
|||
void *const bData = (op->getInputs(1)->getRawDataPtr<void *>()); \
|
||||
void *const cData = (op->getOutput()->getRawDataPtr<void *>()); \
|
||||
\
|
||||
auto a = op->getInputs(0) -> getDims(); \
|
||||
auto aS = op->getInputs(0) -> getStride(); \
|
||||
auto b = op->getInputs(1) -> getDims(); \
|
||||
auto bS = op->getInputs(1) -> getStride(); \
|
||||
auto c = op->getOutput() -> getDims(); \
|
||||
auto cS = op->getOutput() -> getStride(); \
|
||||
auto a = op->getInputs(0)->getDims(); \
|
||||
auto aS = op->getInputs(0)->getStride(); \
|
||||
auto b = op->getInputs(1)->getDims(); \
|
||||
auto bS = op->getInputs(1)->getStride(); \
|
||||
auto c = op->getOutput()->getDims(); \
|
||||
auto cS = op->getOutput()->getStride(); \
|
||||
\
|
||||
std::vector<int64_t> aDim = castTo64(a); \
|
||||
std::vector<int64_t> aStride = castTo64(aS); \
|
||||
|
|
|
@ -91,22 +91,22 @@ class ReluAclnn : public ASCENDKernelWithoutConfig {
|
|||
void *const aData = (op->getInputs(0)->getRawDataPtr<void *>()); \
|
||||
void *const cData = (op->getOutput()->getRawDataPtr<void *>()); \
|
||||
\
|
||||
auto a = op->getInputs(0) -> getDims(); \
|
||||
auto a = op->getInputs(0)->getDims(); \
|
||||
std::vector<int64_t> aDim(a.size(), 1); \
|
||||
for (size_t i = 0; i < a.size(); ++i) { \
|
||||
aDim[i] = int64_t(a[i]); \
|
||||
} \
|
||||
auto aS = op->getInputs(0) -> getStride(); \
|
||||
auto aS = op->getInputs(0)->getStride(); \
|
||||
std::vector<int64_t> aStride(aS.size(), 1); \
|
||||
for (size_t i = 0; i < aS.size(); ++i) { \
|
||||
aStride[i] = int64_t(aS[i]); \
|
||||
} \
|
||||
auto c = op->getInputs(0) -> getDims(); \
|
||||
auto c = op->getInputs(0)->getDims(); \
|
||||
std::vector<int64_t> cDim(c.size(), 1); \
|
||||
for (size_t i = 0; i < c.size(); ++i) { \
|
||||
cDim[i] = int64_t(c[i]); \
|
||||
} \
|
||||
auto cS = op->getInputs(0) -> getStride(); \
|
||||
auto cS = op->getInputs(0)->getStride(); \
|
||||
std::vector<int64_t> cStride(cS.size(), 1); \
|
||||
for (size_t i = 0; i < cS.size(); ++i) { \
|
||||
cStride[i] = int64_t(cS[i]); \
|
||||
|
|
Loading…
Reference in New Issue