From cc8d1f3c9f31ea4919972f14ee3eaaa9a09966e2 Mon Sep 17 00:00:00 2001 From: ChaoII <849453582@qq.com> Date: Tue, 5 Mar 2024 13:37:20 +0800 Subject: [PATCH] [BUG FIX] add export declaration of GaussianRandom function (#2379) * Update fd_type.cc [bug fix]add define for destroy TwoDimArrayCstr for c_api * [BUG FIX] add export declaration of GaussianRandom function --- c_api/fastdeploy_capi/core/fd_type.cc | 2 ++ fastdeploy/function/gaussian_random.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/c_api/fastdeploy_capi/core/fd_type.cc b/c_api/fastdeploy_capi/core/fd_type.cc index c3a742778..252fe2256 100644 --- a/c_api/fastdeploy_capi/core/fd_type.cc +++ b/c_api/fastdeploy_capi/core/fd_type.cc @@ -38,6 +38,8 @@ DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(OneDimArrayFloat) DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(Cstr) // FD_C_OneDimArrayCstr DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(OneDimArrayCstr, Cstr) +// FD_C_TwoDimArrayCstr +DECLARE_AND_IMPLEMENT_FD_TYPE_THREEDIMARRAY(TwoDimArrayCstr,OneDimArrayCstr) // FD_C_TwoDimArraySize DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(TwoDimArraySize, OneDimArraySize) // FD_C_TwoDimArrayInt8 diff --git a/fastdeploy/function/gaussian_random.h b/fastdeploy/function/gaussian_random.h index 85a4ff8a6..98fdc753d 100644 --- a/fastdeploy/function/gaussian_random.h +++ b/fastdeploy/function/gaussian_random.h @@ -28,7 +28,7 @@ namespace function { @param seed The seed of random generator. @param dtype The data type of the output Tensor. */ -void GaussianRandom(const std::vector& shape, FDTensor* out, +FASTDEPLOY_DECL void GaussianRandom(const std::vector& shape, FDTensor* out, FDDataType dtype = FDDataType::FP32, float mean = 0.0f, float std = 1.0f, int seed = 0);