forked from mindspore-Ecosystem/mindspore
cleancodec++
This commit is contained in:
parent
e23bcfad2d
commit
a5cbe2174a
|
@ -17,7 +17,6 @@
|
|||
#ifndef MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_ADJUST_HUE_CPU_KERNEL_H_
|
||||
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_ADJUST_HUE_CPU_KERNEL_H_
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "plugin/device/cpu/kernel/cpu_kernel.h"
|
||||
#include "plugin/factory/ms_factory.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#ifndef MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_ADJUST_SATURATION_CPU_KERNEL_H_
|
||||
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_ADJUST_SATURATION_CPU_KERNEL_H_
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "plugin/device/cpu/kernel/cpu_kernel.h"
|
||||
#include "plugin/factory/ms_factory.h"
|
||||
|
||||
|
|
|
@ -21,12 +21,6 @@
|
|||
namespace {
|
||||
const size_t kOutputsNum = 1;
|
||||
const size_t kInputsNum = 1;
|
||||
|
||||
#define Angle_COMPUTE_CASE(IN_DTYPE, IN_TYPE, OUT_DTYPE) \
|
||||
case (IN_DTYPE): { \
|
||||
ret = LaunchKernel<IN_TYPE, OUT_DTYPE>(inputs, outputs); \
|
||||
break; \
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace mindspore {
|
||||
|
@ -45,9 +39,18 @@ bool AngleCpuKernelMod::Launch(const std::vector<kernel::AddressPtr> &inputs, co
|
|||
CHECK_KERNEL_OUTPUTS_NUM(outputs.size(), kOutputsNum, kernel_name_);
|
||||
bool ret = true;
|
||||
switch (input_dtype_) {
|
||||
Angle_COMPUTE_CASE(kNumberTypeComplex64, std::complex<float>, float)
|
||||
Angle_COMPUTE_CASE(kNumberTypeComplex128, std::complex<double>, double) default : ret = false;
|
||||
MS_EXCEPTION(TypeError) << "For 'Angle', unsupported input data type: " << TypeIdToString(input_dtype_);
|
||||
case (kNumberTypeComplex64): {
|
||||
ret = LaunchKernel<std::complex<float>, float>(inputs, outputs);
|
||||
break;
|
||||
}
|
||||
case (kNumberTypeComplex128): {
|
||||
ret = LaunchKernel<std::complex<double>, double>(inputs, outputs);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
ret = false;
|
||||
MS_EXCEPTION(TypeError) << "For 'Angle', unsupported input data type: " << TypeIdToString(input_dtype_);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#define MINDSPORE_CCSRC_BACKEND_KERNEL_COMPILER_CPU_ANGLE_CPU_KERNEL_H_
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "plugin/device/cpu/kernel/cpu_kernel.h"
|
||||
#include "plugin/factory/ms_factory.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue