LLZK
3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Toggle main menu visibility
Loading...
Searching...
No Matches
Array.h
Go to the documentation of this file.
1
//===-- Array.h - C API for Array dialect -------------------------*- C -*-===//
2
//
3
// Part of the LLZK Project, under the Apache License v2.0.
4
// See LICENSE.txt for license information.
5
// Copyright 2025 Veridise Inc.
6
// SPDX-License-Identifier: Apache-2.0
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
// This header declares the C interface for registering and accessing the
11
// Array dialect. A dialect should be registered with a context to make it
12
// available to users of the context. These users must load the dialect
13
// before using any of its attributes, operations, or types. Parser and pass
14
// manager can load registered dialects automatically.
15
//
16
//===----------------------------------------------------------------------===//
17
18
#ifndef LLZK_C_DIALECT_ARRAY_H
19
#define LLZK_C_DIALECT_ARRAY_H
20
21
#include "
llzk-c/Support.h
"
22
23
#include <mlir-c/IR.h>
24
25
#include <stdint.h>
26
27
// Include the generated CAPI
28
#include "
llzk/Dialect/Array/IR/Ops.capi.h.inc
"
29
#include "
llzk/Dialect/Array/IR/Types.capi.h.inc
"
30
#include "
llzk/Dialect/Array/Transforms/TransformationPasses.capi.h.inc
"
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
37
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION
(Array, llzk__array);
38
39
//===----------------------------------------------------------------------===//
40
// ArrayType
41
//===----------------------------------------------------------------------===//
42
57
MLIR_CAPI_EXPORTED MlirType
58
llzkArray_ArrayTypeGetWithDims
(MlirType type, intptr_t nDims, MlirAttribute
const
*dims);
59
61
MLIR_CAPI_EXPORTED MlirType
62
llzkArray_ArrayTypeGetWithShape
(MlirType type, intptr_t nDims, int64_t
const
*dims);
63
65
MLIR_CAPI_EXPORTED MlirType
llzkArray_ArrayTypeGetElementType
(MlirType type);
66
67
//===----------------------------------------------------------------------===//
68
// CreateArrayOp
69
//===----------------------------------------------------------------------===//
70
72
LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD
(
73
Array, CreateArrayOp, WithValues, MlirType arrType, intptr_t nValues, MlirValue
const
*values
74
);
75
77
LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD
(
78
Array, CreateArrayOp, WithMapOperands, MlirType arrType,
79
LlzkAffineMapOperandsBuilder
mapOperands
80
);
81
82
#ifdef __cplusplus
83
}
84
#endif
85
86
#endif
// LLZK_C_DIALECT_ARRAY_H
Ops.capi.h.inc
Types.capi.h.inc
TransformationPasses.capi.h.inc
llzkArray_ArrayTypeGetElementType
MLIR_CAPI_EXPORTED MlirType llzkArray_ArrayTypeGetElementType(MlirType type)
Returns the element type of an llzk::array::ArrayType.
Definition
Types.capi.cpp.inc:23
llzkArray_ArrayTypeGetWithShape
MLIR_CAPI_EXPORTED MlirType llzkArray_ArrayTypeGetWithShape(MlirType type, intptr_t nDims, int64_t const *dims)
Creates an llzk::array::ArrayType using a list of numbers as dimensions.
Definition
Array.cpp:53
llzkArray_ArrayTypeGetWithDims
MLIR_CAPI_EXPORTED MlirType llzkArray_ArrayTypeGetWithDims(MlirType type, intptr_t nDims, MlirAttribute const *dims)
Creates an llzk::array::ArrayType using a list of attributes as dimensions.
Definition
Array.cpp:47
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Array, llzk__array)
Get reference to the LLZK array dialect.
Support.h
LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD
#define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(dialect, op, suffix,...)
Definition
Support.h:33
LlzkAffineMapOperandsBuilder
Encapsulates the arguments related to affine maps that are common in operation constructors that supp...
Definition
Support.h:103
include
llzk-c
Dialect
Array.h
Generated by
1.17.0
Copyright 2025 Veridise Inc. under the Apache License v2.0. Copyright 2026 Project LLZK under the Apache License v2.0.