Skip to content

Commit cc8d1f3

Browse files
authored
[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
1 parent d197f7d commit cc8d1f3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

c_api/fastdeploy_capi/core/fd_type.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(OneDimArrayFloat)
3838
DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(Cstr)
3939
// FD_C_OneDimArrayCstr
4040
DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(OneDimArrayCstr, Cstr)
41+
// FD_C_TwoDimArrayCstr
42+
DECLARE_AND_IMPLEMENT_FD_TYPE_THREEDIMARRAY(TwoDimArrayCstr,OneDimArrayCstr)
4143
// FD_C_TwoDimArraySize
4244
DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(TwoDimArraySize, OneDimArraySize)
4345
// FD_C_TwoDimArrayInt8

fastdeploy/function/gaussian_random.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace function {
2828
@param seed The seed of random generator.
2929
@param dtype The data type of the output Tensor.
3030
*/
31-
void GaussianRandom(const std::vector<int64_t>& shape, FDTensor* out,
31+
FASTDEPLOY_DECL void GaussianRandom(const std::vector<int64_t>& shape, FDTensor* out,
3232
FDDataType dtype = FDDataType::FP32, float mean = 0.0f,
3333
float std = 1.0f, int seed = 0);
3434

0 commit comments

Comments
 (0)