15 #include "fastdeploy/vision/common/processors/mat.h" 18 #include <cuda_runtime_api.h> 24 enum FDMatBatchLayout { NHWC, NCHW };
34 explicit FDMatBatch(std::vector<FDMat>* _mats) {
36 layout = FDMatBatchLayout::NHWC;
37 mat_type = ProcLib::OPENCV;
47 cudaStream_t stream =
nullptr;
49 std::shared_ptr<FDTensor> fd_tensor = std::make_shared<FDTensor>();
57 cudaStream_t Stream()
const {
return stream; }
58 void SetStream(cudaStream_t s);
61 std::vector<FDMat>* mats =
nullptr;
64 std::vector<FDMat> mats_holder;
66 ProcLib mat_type = ProcLib::OPENCV;
67 FDMatBatchLayout layout = FDMatBatchLayout::NHWC;
68 Device device = Device::CPU;
69 ProcLib proc_lib = ProcLib::DEFAULT;
73 bool has_batched_tensor =
false;
FDTensor object used to represend data matrix.
Definition: fd_tensor.h:31
FDMatBatch contains batch data for preprocess.
Definition: mat_batch.h:28
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16