clear code warning

This commit is contained in:
wangyanling 2021-04-12 14:31:39 +08:00
parent d2f8464367
commit 92144103ba
2 changed files with 1 additions and 5 deletions

View File

@ -57,7 +57,7 @@ bool BiasAddCPUKernel::Launch(const std::vector<AddressPtr> &inputs, const std::
size_t offset = n * c_size * hw_size + c * hw_size;
size_t hw = 0;
#ifdef ENABLE_AVX
constexpr size_t C8NUM = 8;
const size_t C8NUM = 8;
size_t hw8 = hw_size / C8NUM * C8NUM;
const float *in_ptr = src_addr + offset;
float *out_ptr = output_addr + offset;

View File

@ -189,11 +189,7 @@ void SliceCPUKernel::CopyDataToOutput(const std::vector<kernel::AddressPtr> &inp
MS_LOG(EXCEPTION) << id << " output memory out of bounds.";
}
size_t buff_size = out_buff_size - out_offset * sizeof(T);
size_t copy_size = copy_num * sizeof(T);
if (buff_size < copy_size) {
MS_LOG(EXCEPTION) << "output buffer is not enough. memcpy failed!";
}
auto ret = memcpy_s(output_addr + out_offset, copy_size, input_addr + in_offset, copy_size);
if (ret != EOK) {
MS_LOG(EXCEPTION) << "memcpy failed. ret:" << ret;