mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 00:57:33 +08:00
[Functions] Add quantile function (#700)
* Add sort function * Add isfinite function * upgrade isinf isnan * Add Scalar to FDTensor * Add floor, ceil function * add cast functions * Update out_tmp * Update quantile * add gather scatter along axis * finish quantile function * Add quantile unittest * refresh code style for test source code * Add comments * Add full function * Add scalar to fd tensor * Add full unittest * Add functions headers * move fdtensor operators to fastdeploy namespace
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
|
||||
namespace fastdeploy {
|
||||
|
||||
struct Scalar;
|
||||
|
||||
struct FASTDEPLOY_DECL FDTensor {
|
||||
// std::vector<int8_t> data;
|
||||
void* buffer_ = nullptr;
|
||||
@@ -126,6 +128,8 @@ struct FASTDEPLOY_DECL FDTensor {
|
||||
|
||||
FDTensor() {}
|
||||
explicit FDTensor(const std::string& tensor_name);
|
||||
explicit FDTensor(const char* tensor_name);
|
||||
|
||||
// Deep copy
|
||||
FDTensor(const FDTensor& other);
|
||||
// Move constructor
|
||||
@@ -136,6 +140,9 @@ struct FASTDEPLOY_DECL FDTensor {
|
||||
// Move assignment
|
||||
FDTensor& operator=(FDTensor&& other);
|
||||
|
||||
// Scalar to FDTensor
|
||||
explicit FDTensor(const Scalar& scalar);
|
||||
|
||||
~FDTensor() { FreeFn(); }
|
||||
|
||||
static void CopyBuffer(void* dst, const void* src, size_t nbytes,
|
||||
|
Reference in New Issue
Block a user