cleancodec++

This commit is contained in:
yide12 2022-08-03 17:45:06 +08:00
parent e23bcfad2d
commit a5cbe2174a
4 changed files with 12 additions and 14 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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;
}

View File

@ -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"