//
// /build/openimagedenoise/src/oidn-2.4.1/build/devices/cpu/cpu_conv_amx_ispc.h
// (Header automatically generated by the ispc compiler.)
// DO NOT EDIT THIS FILE.
//

#pragma once
#include <stdint.h>

#if !defined(__cplusplus)
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
#include <stdbool.h>
#else
typedef int bool;
#endif
#endif



#ifdef __cplusplus
namespace ispc { /* namespace */
#endif // __cplusplus
///////////////////////////////////////////////////////////////////////////
// Enumerator types with external visibility from ispc code
///////////////////////////////////////////////////////////////////////////

#ifndef __ISPC_ENUM_PostOp__
#define __ISPC_ENUM_PostOp__
enum PostOp {
    PostOp_None = 0,
    PostOp_Pool = 1,
    PostOp_Upsample = 2 
};
#endif


/* Portable alignment macro that works across different compilers and standards */
#if defined(__cplusplus) && __cplusplus >= 201103L
/* C++11 or newer - use alignas keyword */
#define __ISPC_ALIGN__(x) alignas(x)
#elif defined(__GNUC__) || defined(__clang__)
/* GCC or Clang - use __attribute__ */
#define __ISPC_ALIGN__(x) __attribute__((aligned(x)))
#elif defined(_MSC_VER)
/* Microsoft Visual C++ - use __declspec */
#define __ISPC_ALIGN__(x) __declspec(align(x))
#else
/* Unknown compiler/standard - alignment not supported */
#define __ISPC_ALIGN__(x)
#warning "Alignment not supported on this compiler"
#endif // defined(__cplusplus) && __cplusplus >= 201103L
#ifndef __ISPC_ALIGNED_STRUCT__
#if defined(__clang__) || !defined(_MSC_VER) || _MSC_VER > 1943
// Clang, GCC, ICC, Visual Studio
#define __ISPC_ALIGNED_STRUCT__(s) struct __ISPC_ALIGN__(s)
#else
// Older Visual Studio
#define __ISPC_ALIGNED_STRUCT__(s) __ISPC_ALIGN__(s) struct
#endif // defined(__clang__) || !defined(_MSC_VER) || _MSC_VER > 1943
#endif // __ISPC_ALIGNED_STRUCT__

#ifndef __ISPC_STRUCT_TensorAccessor3D_ChwBc__
#define __ISPC_STRUCT_TensorAccessor3D_ChwBc__
struct TensorAccessor3D_ChwBc {
    int8_t * ptr;
    uint32_t hByteStride;
    uint32_t CByteStride;
    int32_t C;
    int32_t H;
    int32_t W;
};
#endif

#ifndef __ISPC_STRUCT_TensorAccessor4D_OIhwPoQiRoSi__
#define __ISPC_STRUCT_TensorAccessor4D_OIhwPoQiRoSi__
struct TensorAccessor4D_OIhwPoQiRoSi {
    int8_t * ptr;
    uint32_t OByteStride;
};
#endif

#ifndef __ISPC_STRUCT_TensorAccessor1D__
#define __ISPC_STRUCT_TensorAccessor1D__
struct TensorAccessor1D {
    int8_t * ptr;
    int32_t X;
};
#endif

#ifndef __ISPC_STRUCT_AMXTileConfig__
#define __ISPC_STRUCT_AMXTileConfig__
struct AMXTileConfig {
    uint8_t palette_id;
    uint8_t start_row;
    uint8_t reserved_0[14];
    uint16_t colsb[16];
    uint8_t rows[16];
};
#endif

#ifndef __ISPC_STRUCT_CPUConvAMXKernel__
#define __ISPC_STRUCT_CPUConvAMXKernel__
struct CPUConvAMXKernel {
    struct TensorAccessor3D_ChwBc src;
    struct TensorAccessor4D_OIhwPoQiRoSi weight;
    struct TensorAccessor1D bias;
    struct TensorAccessor3D_ChwBc dst;
    bool relu;
    enum PostOp postOp;
    struct AMXTileConfig tileConfig;
};
#endif


///////////////////////////////////////////////////////////////////////////
// Functions exported from ispc code
///////////////////////////////////////////////////////////////////////////
#if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
extern "C" {
#endif // __cplusplus
    extern void CPUConvAMXKernel_init(struct CPUConvAMXKernel * self);
    extern void CPUConvAMXKernel_run_f16(const struct CPUConvAMXKernel * self, int32_t oc, int32_t ohBegin, int32_t ohEnd, int32_t ow, bool isFirst, bool isLast);
#if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )
} /* end extern C */
#endif // __cplusplus


#ifdef __cplusplus
} /* namespace */
#endif // __cplusplus
