parent
6849173681
commit
94047f6360
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "src/ops/primitive_c.h"
|
||||
|
||||
#ifndef LITE_MINDSPORE_LITE_C_OPS_IF_H_
|
||||
#define LITE_MINDSPORE_LITE_C_OPS_IF_H_
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
class If : public PrimitiveC {
|
||||
public:
|
||||
MS_DECLARE_PARENT(If, PrimitiveC);
|
||||
If() = default;
|
||||
~If() = default;
|
||||
explicit If(schema::PrimitiveT *primitive) : PrimitiveC(primitive) {}
|
||||
};
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
||||
#endif // LITE_MINDSPORE_LITE_C_OPS_IF_H_
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "src/ops/primitive_c.h"
|
||||
#include "src/ops/populate/populate_register.h"
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
|
||||
OpParameter *PopulateWhereParameter(const mindspore::lite::PrimitiveC *primitive) {
|
||||
OpParameter *where_parameter = reinterpret_cast<OpParameter *>(malloc(sizeof(OpParameter)));
|
||||
if (where_parameter == nullptr) {
|
||||
MS_LOG(ERROR) << "malloc Where parameter failed.";
|
||||
return nullptr;
|
||||
}
|
||||
memset(where_parameter, 0, sizeof(OpParameter));
|
||||
where_parameter->type_ = primitive->Type();
|
||||
return reinterpret_cast<OpParameter *>(where_parameter);
|
||||
}
|
||||
Registry WhereParameterRegistry(schema::PrimitiveType_Where, PopulateWhereParameter);
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Copyright 2020 Huawei Technologies Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "src/ops/primitive_c.h"
|
||||
|
||||
#ifndef LITE_MINDSPORE_LITE_C_OPS_SELECT_H_
|
||||
#define LITE_MINDSPORE_LITE_C_OPS_SELECT_H_
|
||||
|
||||
namespace mindspore {
|
||||
namespace lite {
|
||||
class Select : public PrimitiveC {
|
||||
public:
|
||||
MS_DECLARE_PARENT(Select, PrimitiveC);
|
||||
Select() = default;
|
||||
~Select() = default;
|
||||
explicit Select(schema::PrimitiveT *primitive) : PrimitiveC(primitive) {}
|
||||
};
|
||||
} // namespace lite
|
||||
} // namespace mindspore
|
||||
#endif // LITE_MINDSPORE_LITE_C_OPS_SELECT_H_
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue