[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
This commit is contained in:
ChaoII
2024-03-05 13:37:20 +08:00
committed by GitHub
parent d197f7d7d4
commit cc8d1f3c9f
2 changed files with 3 additions and 1 deletions

View File

@@ -38,6 +38,8 @@ DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(OneDimArrayFloat)
DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(Cstr) DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(Cstr)
// FD_C_OneDimArrayCstr // FD_C_OneDimArrayCstr
DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(OneDimArrayCstr, Cstr) DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(OneDimArrayCstr, Cstr)
// FD_C_TwoDimArrayCstr
DECLARE_AND_IMPLEMENT_FD_TYPE_THREEDIMARRAY(TwoDimArrayCstr,OneDimArrayCstr)
// FD_C_TwoDimArraySize // FD_C_TwoDimArraySize
DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(TwoDimArraySize, OneDimArraySize) DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(TwoDimArraySize, OneDimArraySize)
// FD_C_TwoDimArrayInt8 // FD_C_TwoDimArrayInt8

View File

@@ -28,7 +28,7 @@ namespace function {
@param seed The seed of random generator. @param seed The seed of random generator.
@param dtype The data type of the output Tensor. @param dtype The data type of the output Tensor.
*/ */
void GaussianRandom(const std::vector<int64_t>& shape, FDTensor* out, FASTDEPLOY_DECL void GaussianRandom(const std::vector<int64_t>& shape, FDTensor* out,
FDDataType dtype = FDDataType::FP32, float mean = 0.0f, FDDataType dtype = FDDataType::FP32, float mean = 0.0f,
float std = 1.0f, int seed = 0); float std = 1.0f, int seed = 0);