namespace dnnl

oneDNN namespace

namespace dnnl {

// namespaces

namespace dnnl::ocl_interop;
namespace dnnl::sycl_interop;
namespace dnnl::threadpool_interop;

// typedefs

typedef dnnl_version_t version_t;

// enums

enum algorithm;
enum cpu_isa;
enum cpu_isa_hints;
enum fpmath_mode;
enum normalization_flags;
enum prop_kind;
enum query;
enum rnn_direction;
enum rnn_flags;
enum scratchpad_mode;
enum status;

// structs

struct batch_normalization_backward;
struct batch_normalization_forward;
struct binary;
struct concat;
struct convolution_backward_data;
struct convolution_backward_weights;
struct convolution_forward;
struct deconvolution_backward_data;
struct deconvolution_backward_weights;
struct deconvolution_forward;
struct eltwise_backward;
struct eltwise_forward;
struct engine;
struct error;
struct gru_backward;
struct gru_forward;

template <typename T, typename traits = handle_traits<T>>
struct handle;

template <typename T>
struct handle_traits;

struct inner_product_backward_data;
struct inner_product_backward_weights;
struct inner_product_forward;
struct layer_normalization_backward;
struct layer_normalization_forward;
struct lbr_gru_backward;
struct lbr_gru_forward;
struct logsoftmax_backward;
struct logsoftmax_forward;
struct lrn_backward;
struct lrn_forward;
struct lstm_backward;
struct lstm_forward;
struct matmul;
struct memory;
struct pooling_backward;
struct pooling_forward;
struct pooling_v2_backward;
struct pooling_v2_forward;
struct post_ops;
struct prelu_backward;
struct prelu_forward;
struct primitive;
struct primitive_desc;
struct primitive_desc_base;
struct reduction;
struct reorder;
struct resampling_backward;
struct resampling_forward;
struct rnn_primitive_desc_base;
struct shuffle_backward;
struct shuffle_forward;
struct softmax_backward;
struct softmax_forward;
struct stream;
struct sum;
struct vanilla_rnn_backward;
struct vanilla_rnn_forward;

// global functions

dnnl_primitive_kind_t convert_to_c(primitive::kind akind);
dnnl_fpmath_mode_t convert_to_c(fpmath_mode mode);
dnnl_scratchpad_mode_t convert_to_c(scratchpad_mode mode);
dnnl_prop_kind_t convert_to_c(prop_kind akind);
dnnl_alg_kind_t convert_to_c(algorithm aalgorithm);
dnnl_normalization_flags_t convert_to_c(normalization_flags flags);
dnnl_rnn_flags_t convert_to_c(rnn_flags flags);
dnnl_rnn_direction_t convert_to_c(rnn_direction dir);
dnnl_query_t convert_to_c(query aquery);
dnnl_engine_kind_t convert_to_c(engine::kind akind);
bool operator == (dnnl_data_type_t a, memory::data_type b);
bool operator != (dnnl_data_type_t a, memory::data_type b);
bool operator == (memory::data_type a, dnnl_data_type_t b);
bool operator != (memory::data_type a, dnnl_data_type_t b);
bool operator == (dnnl_format_tag_t a, memory::format_tag b);
bool operator != (dnnl_format_tag_t a, memory::format_tag b);
bool operator == (memory::format_tag a, dnnl_format_tag_t b);
bool operator != (memory::format_tag a, dnnl_format_tag_t b);
status set_verbose(int level);
const version_t* version();
fpmath_mode get_default_fpmath_mode();
status set_default_fpmath_mode(fpmath_mode mode);
status set_jit_dump(int enable);
status set_jit_profiling_flags(unsigned flags);
status set_jit_profiling_jitdumpdir(const std::string& dir);
status set_max_cpu_isa(cpu_isa isa);
cpu_isa get_effective_cpu_isa();
status set_cpu_isa_hints(cpu_isa_hints isa_hints);
cpu_isa_hints get_cpu_isa_hints();
int get_primitive_cache_capacity();
void set_primitive_cache_capacity(int capacity);

status sgemm(
    char transa,
    char transb,
    dnnl_dim_t M,
    dnnl_dim_t N,
    dnnl_dim_t K,
    float alpha,
    const float* A,
    dnnl_dim_t lda,
    const float* B,
    dnnl_dim_t ldb,
    float beta,
    float* C,
    dnnl_dim_t ldc
    );

status gemm_u8s8s32(
    char transa,
    char transb,
    char offsetc,
    dnnl_dim_t M,
    dnnl_dim_t N,
    dnnl_dim_t K,
    float alpha,
    const uint8_t* A,
    dnnl_dim_t lda,
    uint8_t ao,
    const int8_t* B,
    dnnl_dim_t ldb,
    int8_t bo,
    float beta,
    int32_t* C,
    dnnl_dim_t ldc,
    const int32_t* co
    );

status gemm_s8s8s32(
    char transa,
    char transb,
    char offsetc,
    dnnl_dim_t M,
    dnnl_dim_t N,
    dnnl_dim_t K,
    float alpha,
    const int8_t* A,
    dnnl_dim_t lda,
    int8_t ao,
    const int8_t* B,
    dnnl_dim_t ldb,
    int8_t bo,
    float beta,
    int32_t* C,
    dnnl_dim_t ldc,
    const int32_t* co
    );

} // namespace dnnl