|
| 1 | +// WARNING: This file is auto-generated by a script. |
| 2 | +// Any changes made to this file may be overwritten. |
| 3 | +// Please modify the code generation script instead. |
| 4 | +// Path to the code generation script: scripts/gen_c_api.py |
| 5 | + |
| 6 | +#pragma once |
| 7 | + |
| 8 | +#include "icicle/fields/stark_fields/koalabear.h" |
| 9 | +#include "icicle/ntt.h" |
| 10 | +#include "icicle/vec_ops.h" |
| 11 | + |
| 12 | +extern "C" void koalabear_extension_generate_scalars(koalabear::extension_t* scalars, int size); |
| 13 | + |
| 14 | +extern "C" eIcicleError koalabear_extension_scalar_convert_montgomery( |
| 15 | + const koalabear::extension_t* input, |
| 16 | + uint64_t size, |
| 17 | + bool is_into, |
| 18 | + const VecOpsConfig* config, |
| 19 | + koalabear::extension_t* output); |
| 20 | + |
| 21 | +extern "C" eIcicleError |
| 22 | +koalabear_ntt_init_domain(koalabear::scalar_t* primitive_root, const NTTInitDomainConfig* config); |
| 23 | + |
| 24 | +extern "C" eIcicleError koalabear_ntt( |
| 25 | + const koalabear::scalar_t* input, |
| 26 | + int size, |
| 27 | + NTTDir dir, |
| 28 | + const NTTConfig<koalabear::scalar_t>* config, |
| 29 | + koalabear::scalar_t* output); |
| 30 | + |
| 31 | +extern "C" eIcicleError koalabear_ntt_release_domain(); |
| 32 | + |
| 33 | +extern "C" eIcicleError koalabear_extension_vector_mul( |
| 34 | + const koalabear::extension_t* vec_a, |
| 35 | + const koalabear::extension_t* vec_b, |
| 36 | + uint64_t n, |
| 37 | + const VecOpsConfig* config, |
| 38 | + koalabear::extension_t* result); |
| 39 | + |
| 40 | +extern "C" eIcicleError koalabear_extension_vector_add( |
| 41 | + const koalabear::extension_t* vec_a, |
| 42 | + const koalabear::extension_t* vec_b, |
| 43 | + uint64_t n, |
| 44 | + const VecOpsConfig* config, |
| 45 | + koalabear::extension_t* result); |
| 46 | + |
| 47 | +extern "C" eIcicleError koalabear_extension_vector_sub( |
| 48 | + const koalabear::extension_t* vec_a, |
| 49 | + const koalabear::extension_t* vec_b, |
| 50 | + uint64_t n, |
| 51 | + const VecOpsConfig* config, |
| 52 | + koalabear::extension_t* result); |
| 53 | + |
| 54 | +extern "C" eIcicleError koalabear_extension_matrix_transpose( |
| 55 | + const koalabear::extension_t* input, |
| 56 | + uint32_t nof_rows, |
| 57 | + uint32_t nof_cols, |
| 58 | + const VecOpsConfig* config, |
| 59 | + koalabear::extension_t* output); |
| 60 | + |
| 61 | +extern "C" eIcicleError koalabear_extension_bit_reverse( |
| 62 | + const koalabear::extension_t* input, uint64_t n, const VecOpsConfig* config, koalabear::extension_t* output); |
| 63 | + |
| 64 | +extern "C" eIcicleError koalabear_extension_ntt( |
| 65 | + const koalabear::extension_t* input, |
| 66 | + int size, |
| 67 | + NTTDir dir, |
| 68 | + const NTTConfig<koalabear::scalar_t>* config, |
| 69 | + koalabear::extension_t* output); |
| 70 | + |
| 71 | +extern "C" void koalabear_generate_scalars(koalabear::scalar_t* scalars, int size); |
| 72 | + |
| 73 | +extern "C" void koalabear_scalar_convert_montgomery( |
| 74 | + const koalabear::scalar_t* input, |
| 75 | + uint64_t size, |
| 76 | + bool is_into, |
| 77 | + const VecOpsConfig* config, |
| 78 | + koalabear::scalar_t* output); |
| 79 | + |
| 80 | +extern "C" eIcicleError koalabear_vector_mul( |
| 81 | + const koalabear::scalar_t* vec_a, |
| 82 | + const koalabear::scalar_t* vec_b, |
| 83 | + uint64_t n, |
| 84 | + const VecOpsConfig* config, |
| 85 | + koalabear::scalar_t* result); |
| 86 | + |
| 87 | +extern "C" eIcicleError koalabear_vector_add( |
| 88 | + const koalabear::scalar_t* vec_a, |
| 89 | + const koalabear::scalar_t* vec_b, |
| 90 | + uint64_t n, |
| 91 | + const VecOpsConfig* config, |
| 92 | + koalabear::scalar_t* result); |
| 93 | + |
| 94 | +extern "C" eIcicleError koalabear_vector_sub( |
| 95 | + const koalabear::scalar_t* vec_a, |
| 96 | + const koalabear::scalar_t* vec_b, |
| 97 | + uint64_t n, |
| 98 | + const VecOpsConfig* config, |
| 99 | + koalabear::scalar_t* result); |
| 100 | + |
| 101 | +extern "C" eIcicleError koalabear_matrix_transpose( |
| 102 | + const koalabear::scalar_t* input, |
| 103 | + uint32_t nof_rows, |
| 104 | + uint32_t nof_cols, |
| 105 | + const VecOpsConfig* config, |
| 106 | + koalabear::scalar_t* output); |
| 107 | + |
| 108 | +extern "C" eIcicleError koalabear_bit_reverse( |
| 109 | + const koalabear::scalar_t* input, uint64_t n, const VecOpsConfig* config, koalabear::scalar_t* output); |
0 commit comments