cupva_host_dataflow.h#
Fully qualified name: src/host/c_api/include/detail/workloads/cupva_host_dataflow.h
File members: src/host/c_api/include/detail/workloads/cupva_host_dataflow.h
/*
* Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual property
* and proprietary rights in and to this software, related documentation
* and any modifications thereto. Any use, reproduction, disclosure or
* distribution of this software and related documentation without an express
* license agreement from NVIDIA Corporation is strictly prohibited.
*/
#ifndef CUPVA_HOST_DATAFLOW_H
#define CUPVA_HOST_DATAFLOW_H
#include <cupva_types.h>
#include <detail/workloads/cupva_host_types_workloads.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
cupvaParameter_t *handler;
cupvaGranType_t GranularityType;
int32_t tileWidth;
int32_t tileHeight;
int32_t bpp;
cupvaPadModeType_t padMode;
int32_t padVal;
cupvaPadDirType_t padDir;
int32_t padDim;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
int32_t linePitchSrc;
int32_t cbStartSrc;
int32_t cbLenSrc;
int32_t niterSrcDim1;
int32_t advSrcDim1;
int32_t niterSrcDim2;
int32_t advSrcDim2;
int32_t niterSrcDim3;
int32_t advSrcDim3;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t linePitchDst;
int32_t cbStartDst;
int32_t cbLenDst;
int32_t niterDstDim1;
int32_t advDstDim1;
int32_t niterDstDim2;
int32_t advDstDim2;
int32_t niterDstDim3;
int32_t advDstDim3;
void *ptrDst2;
} cupvaStaticDataFlowParams_t;
typedef struct
{
int32_t tileWidth;
int32_t tileHeight;
int32_t bpp;
cupvaPadModeType_t padMode;
int32_t padVal;
cupvaPadDirType_t padDir;
int32_t padDim;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
int32_t linePitchSrc;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t linePitchDst;
} cupvaNodeParams_t;
typedef struct
{
cupvaParameter_t *handler;
int32_t nodeCount;
int32_t laneCount;
} cupvaDynamicDataFlowParams_t;
typedef struct
{
cupvaParameter_t *handler;
int32_t roiX;
int32_t roiY;
int32_t roiWidth;
int32_t roiHeight;
int32_t tileWidth;
int32_t tileHeight;
uint32_t scanOrder;
int32_t bpp;
int32_t haloX;
int32_t haloY;
cupvaPadModeType_t padMode;
int32_t padVal;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
int32_t linePitchSrc;
int32_t srcWidth;
int32_t srcHeight;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t linePitchDst;
int32_t dstWidth;
int32_t dstHeight;
void *ptrTileBuffer;
void *ptrTileReplicationBuffer;
int32_t tileArenaWidth;
int32_t tileArenaHeight;
cupvaTransModeType_t transMode;
} cupvaRasterDataFlowParams_t;
typedef struct
{
cupvaParameter_t *handler;
uint32_t *vpuConfigTable;
} cupvaConfigDataFlowParams_t;
typedef struct
{
cupvaParameter_t *handler;
} cupvaSequenceDataFlowParams_t;
typedef struct
{
cupvaTransferModeType_t transferMode;
int32_t tileWidth;
int32_t tileHeight;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
int32_t linePitchSrc;
int32_t niterSrcDim1;
int32_t advSrcDim1;
int32_t niterSrcDim2;
int32_t advSrcDim2;
int32_t niterSrcDim3;
int32_t advSrcDim3;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t linePitchDst;
int32_t niterDstDim1;
int32_t advDstDim1;
int32_t niterDstDim2;
int32_t advDstDim2;
int32_t niterDstDim3;
int32_t advDstDim3;
} cupvaSequenceDataFlowTransferParams_t;
typedef struct
{
cupvaParameter_t *handler;
int32_t numTilesPerTrigger;
cupvaBufferType_t bufferType;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t bpp;
int32_t extWidth;
int32_t extHeight;
int32_t extLinePitch;
bool allowNonUniformLP;
struct PlanarGeometry *geom;
int32_t tileWidth;
int32_t tileHeight;
cupvaPadModeType_t padMode;
int32_t padVal;
} cupvaGatherScatterDataFlowParams_t;
typedef struct
{
cupvaParameter_t *handler;
int32_t roiX;
int32_t roiY;
int32_t roiWidth;
int32_t roiHeight;
int32_t tileWidth;
int32_t tileHeight;
int32_t tileDepth;
int32_t bpp;
int32_t haloX;
int32_t haloY;
cupvaPadModeType_t padMode;
int32_t padVal;
const void *ptrSrc;
cupvaOffsetPointer_t *opSrc;
int32_t srcWidth;
int32_t srcHeight;
int32_t srcDepth;
int32_t rowStrideSrc;
int32_t depthStrideSrc;
void *ptrDst;
cupvaOffsetPointer_t *opDst;
int32_t dstWidth;
int32_t dstHeight;
int32_t dstDepth;
int32_t rowStrideDst;
int32_t depthStrideDst;
void *ptrTileBuffer;
} cupvaTensorDataFlowParams_t;
DLL_EXPORT cupvaError_t CupvaDataFlowLink(cupvaDataFlow_t const df1, cupvaDataFlow_t const df2);
DLL_EXPORT cupvaError_t CupvaDataFlowAppend(cupvaDataFlow_t const df1, cupvaDataFlow_t const df2);
DLL_EXPORT cupvaError_t CupvaDataFlowGetId(cupvaDataFlow_t const df, int32_t *const id);
DLL_EXPORT cupvaError_t CupvaStaticDataFlowSetParams(cupvaDataFlow_t const df,
cupvaStaticDataFlowParams_t *const sdfParams);
DLL_EXPORT cupvaError_t CupvaDynamicDataFlowSetParams(cupvaDataFlow_t const df,
cupvaDynamicDataFlowParams_t *const ddfParams);
DLL_EXPORT cupvaError_t CupvaSetNodeParams(cupvaDataFlow_t const df, int32_t const nodeId, int32_t const laneId,
cupvaNodeParams_t *const nodeParams);
DLL_EXPORT cupvaError_t CupvaRasterDataFlowSetParams(cupvaDataFlow_t const df,
cupvaRasterDataFlowParams_t *const rdfParams);
DLL_EXPORT cupvaError_t CupvaConfigDataFlowSetParams(cupvaDataFlow_t const df,
cupvaConfigDataFlowParams_t *const cdfParams);
DLL_EXPORT cupvaError_t CupvaSequenceDataFlowSetParams(cupvaDataFlow_t const df,
cupvaSequenceDataFlowParams_t *const sqdfParams);
DLL_EXPORT cupvaError_t CupvaSequenceDataFlowAddTransfer(cupvaDataFlow_t const df,
cupvaSequenceDataFlowTransferParams_t *const transferParams);
DLL_EXPORT cupvaError_t CupvaGatherScatterDataFlowSetParams(cupvaDataFlow_t const df,
cupvaGatherScatterDataFlowParams_t *const gsdfParams);
DLL_EXPORT cupvaError_t CupvaTensorDataFlowSetParams(cupvaDataFlow_t const df,
cupvaTensorDataFlowParams_t *const tdfParams);
#ifdef __cplusplus
}
#endif
#endif