cupva_host_types_workloads.h#

Fully qualified name: src/host/c_api/include/detail/workloads/cupva_host_types_workloads.h

File members: src/host/c_api/include/detail/workloads/cupva_host_types_workloads.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_TYPES_WORKLOADS_H
#define CUPVA_HOST_TYPES_WORKLOADS_H

#include <cupva_host_types.h>
#include <detail/cupva_host_types_detail.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#define CUPVA_SURFACE_ATTRIBUTES_MAX_NUM_PLANES (6)

typedef enum
{
    CUPVA_GRAN_TYPE_INVALID = 0,
    //transfers a tile
    CUPVA_GRAN_TILE,
    //transfers all tiles in 1st dimension
    CUPVA_GRAN_DIM1,
    //transfers all tiles in 1st and 2nd dimensions
    CUPVA_GRAN_DIM2,
    //transfers all tiles in the dataflow
    CUPVA_GRAN_ALL,
    CUPVA_GRAN_TYPE_MAX
} cupvaGranType_t;

typedef enum
{
    CUPVA_PAD_MODE_TYPE_INVALID = 0,
    CUPVA_PAD_MODE_CONST,
    CUPVA_PAD_MODE_BPE,
    CUPVA_PAD_MODE_TYPE_MAX
} cupvaPadModeType_t;

typedef enum
{
    CUPVA_PAD_DIR_TYPE_INVALID = 0,
    CUPVA_PAD_DIR_NONE,
    CUPVA_PAD_DIR_TOP,
    CUPVA_PAD_DIR_BOTTOM,
    CUPVA_PAD_DIR_INVALID_TOP_BOTTOM,
    CUPVA_PAD_DIR_LEFT,
    CUPVA_PAD_DIR_TOP_LEFT,
    CUPVA_PAD_DIR_BOTTOM_LEFT,
    CUPVA_PAD_DIR_INVALID_TOP_BOTTOM_LEFT,
    CUPVA_PAD_DIR_RIGHT,
    CUPVA_PAD_DIR_TOP_RIGHT,
    CUPVA_PAD_DIR_BOTTOM_RIGHT,
    CUPVA_PAD_DIR_INVALID_PAD,
    CUPVA_PAD_DIR_TYPE_MAX
} cupvaPadDirType_t;

typedef enum
{
    CUPVA_MEM_TYPE_INVALID = 0,
    CUPVA_DRAM,
    CUPVA_SRAM,
    CUPVA_VMEM,
    CUPVA_MEM_TYPE_MAX
} cupvaMemType_t;

typedef enum
{
    CUPVA_BUFFER_TYPE_INVALID,
    CUPVA_SURFACE,
    CUPVA_RAW,
    CUPVA_BUFFER_TYPE_MAX
} cupvaBufferType_t;

typedef enum
{
    CUPVA_SURF_FMT_TYPE_INVALID,
    CUPVA_PITCH_LINEAR,
    CUPVA_BLOCK_LINEAR,
    CUPVA_SURF_FMT_TYPE_MAX
} cupvaSurfaceFormatType_t;

typedef enum
{
    CUPVA_TRANS_MODE_NONE = 0,
    CUPVA_TRANS_MODE_1,
    CUPVA_TRANS_MODE_2,
    CUPVA_TRANS_MODE_4,
    CUPVA_TRANS_MODE_8,
    CUPVA_TRANS_MODE_16,
    CUPVA_TRANS_MODE_32,
} cupvaTransModeType_t;

typedef enum
{
    CUPVA_DATAFLOW_TYPE_INVALID = 0,
    CUPVA_STATIC_DATAFLOW,
    CUPVA_RASTER_DATAFLOW,
    CUPVA_CONFIG_DATAFLOW,
    CUPVA_DYNAMIC_DATAFLOW,
    CUPVA_SEQUENCE_DATAFLOW,
    CUPVA_GATHER_SCATTER_DATAFLOW,
    CUPVA_TENSOR_DATAFLOW,
    CUPVA_DATAFLOW_TYPE_MAX
} cupvaDataFlowType_t;

typedef struct
{
    cupvaBufferType_t bufferType;
    cupvaMemType_t type;
    void *hostPtr;
} cupvaPointerAttributes_t;

typedef struct
{
    int64_t offset;
    int32_t linePitch;
    int32_t widthInBytes;
    int32_t height;
} cupvaPlaneInfo_t;

typedef struct
{
    cupvaSurfaceFormatType_t format;
    int32_t numPlanes;
    cupvaPlaneInfo_t planes[CUPVA_SURFACE_ATTRIBUTES_MAX_NUM_PLANES];
} cupvaSurfaceAttributes_t;

typedef enum
{
    CUPVA_TRANSFER_MODE_INVALID = 0,
    CUPVA_TRANSFER_MODE_TILE,
    CUPVA_TRANSFER_MODE_DIM1,
    CUPVA_TRANSFER_MODE_DIM2,
    CUPVA_TRANSFER_MODE_TRANSFER,
    CUPVA_TRANSFER_MODE_CONTINUOUS,
    CUPVA_TRANSFER_MODE_MAX
} cupvaTransferModeType_t;

#ifdef __cplusplus
}
#endif

#endif