From cb4060cb447f60f3edd24608a7153f26fd8ace06 Mon Sep 17 00:00:00 2001 From: hanbuhe Date: Wed, 12 Sep 2018 20:26:54 +0800 Subject: [PATCH] reinterpret_cast compile error --- src/operators/kernel/fpga/softmax_kernel.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/operators/kernel/fpga/softmax_kernel.cpp b/src/operators/kernel/fpga/softmax_kernel.cpp index f218edbec6..fd84cb8e46 100644 --- a/src/operators/kernel/fpga/softmax_kernel.cpp +++ b/src/operators/kernel/fpga/softmax_kernel.cpp @@ -33,12 +33,11 @@ bool SoftmaxKernel::Init(SoftmaxParam *param) { args.output_layout_type = fpga::LAYOUT_CHW; args.input_data_type = fpga::DATA_TYPE_FP16; args.output_data_type = fpga::DATA_TYPE_FP32; - args.image.address = reinterpret_cast(input_ptr); + args.image.address = (void *)(input_ptr); args.image.height = (uint32_t)input->dims()[0]; args.image.width = (uint32_t)input->dims()[1]; args.image.channels = 1; - args.output.address = - reinterpret_cast floatInput->mutable_data(); + args.output.address = (void *)floatInput->mutable_data(); param->SetFloatInput(floatInput); param->SetFpgaArgs(args); @@ -52,8 +51,7 @@ void SoftmaxKernel::Compute( "==============================================="; const Tensor *in_x = param.FloatInput(); Tensor *out = param.Out(); - fpga::fpga_flush(reinterpret_cast in_x->data(), - in_x->memory_size()); + fpga::fpga_flush((void *)in_x->data(), in_x->memory_size()); fpga::PerformBypass(param.FpgaArgs()); fpga::fpga_invalidate(out->data(), out->memory_size()); -- GitLab