• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

krakjoe / ort / 18868881391

28 Oct 2025 08:38AM UTC coverage: 91.519% (+0.2%) from 91.307%
18868881391

push

github

krakjoe
[ci skip] show diff

3054 of 3337 relevant lines covered (91.52%)

26115.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/src/maths/dispatch.c
1
/*
2
  +----------------------------------------------------------------------+
3
  | ort                                                                  |
4
  +----------------------------------------------------------------------+
5
  | Copyright (c) Joe Watkins 2025                                       |
6
  +----------------------------------------------------------------------+
7
  | This source file is subject to version 3.01 of the PHP license,      |
8
  | that is bundled with this package in the file LICENSE, and is        |
9
  | available through the world-wide-web at the following url:           |
10
  | http://www.php.net/license/3_01.txt                                  |
11
  | If you did not receive a copy of the PHP license and are unable to   |
12
  | obtain it through the world-wide-web, please send a note to          |
13
  | license@php.net so we can mail you a copy immediately.               |
14
  +----------------------------------------------------------------------+
15
  | Author: krakjoe                                                      |
16
  +----------------------------------------------------------------------+
17
 */
18

19
#include "maths/dispatch.h"
20
#include "maths/frontend/impl.h"
21

22
/* Error dispatch */
23
ORT_TLS ort_math_dispatch_t __ort_math_dispatch_error;
24
 
25
/* Complete dispatch table */
26
ORT_TLS ort_math_dispatch_t __ort_math_dispatch_table[] = {
27
    /* FLOAT */
28
    {
29
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT,
30
        .add_func        = ort_math_frontend_add_float,
31
        .add_scalar_func = ort_math_frontend_add_scalar_float,
32

33
        .div_func        = ort_math_frontend_div_float,
34
        .div_scalar_func = ort_math_frontend_div_scalar_float,
35

36
        .sub_func        = ort_math_frontend_sub_float,
37
        .sub_scalar_func = ort_math_frontend_sub_scalar_float,
38

39
        .mul_func        = ort_math_frontend_mul_float,
40
        .mul_scalar_func = ort_math_frontend_mul_scalar_float,
41

42
        .ceil_func       = ort_math_frontend_ceil_float,
43
        .floor_func      = ort_math_frontend_floor_float,
44
        .round_func      = ort_math_frontend_round_float,
45
        .abs_func        = ort_math_frontend_abs_float,
46
        .sqrt_func       = ort_math_frontend_sqrt_float,
47
        .neg_func        = ort_math_frontend_neg_float,
48
        .recip_func      = ort_math_frontend_recip_float,
49
        .sign_func       = ort_math_frontend_sign_float,
50
        .trunc_func      = ort_math_frontend_trunc_float,
51
        .dot_func        = ort_math_frontend_dot_float,
52
        .matmul_func     = ort_math_frontend_matmul_float,
53
        .sum_func        = ort_math_frontend_sum_float,
54
        .sum_axis_func   = ort_math_frontend_sum_axis_float,
55
        .min_func        = ort_math_frontend_min_float,
56
        .min_axis_func   = ort_math_frontend_min_axis_float,
57
        .max_func        = ort_math_frontend_max_float,
58
        .max_axis_func   = ort_math_frontend_max_axis_float,
59
        .mean_func       = ort_math_frontend_mean_float,
60
        .mean_axis_func  = ort_math_frontend_mean_axis_float,
61
        .softmax_axis_func = ort_math_frontend_softmax_axis_float,
62
        .argmax_func     = ort_math_frontend_argmax_float,
63
        .argmax_axis_func = ort_math_frontend_argmax_axis_float,
64

65
        .mod_func        = ort_math_frontend_mod_float,
66
        .mod_scalar_func = ort_math_frontend_mod_scalar_float,
67

68
        .pow_func        = ort_math_frontend_pow_float,
69
        .pow_scalar_func = ort_math_frontend_pow_scalar_float,
70
    },
71
    /* DOUBLE */
72
    {
73
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE,
74
        .add_func        = ort_math_frontend_add_double,
75
        .add_scalar_func = ort_math_frontend_add_scalar_double,
76

77
        .div_func        = ort_math_frontend_div_double,
78
        .div_scalar_func = ort_math_frontend_div_scalar_double,
79

80
        .sub_func        = ort_math_frontend_sub_double,
81
        .sub_scalar_func = ort_math_frontend_sub_scalar_double,
82

83
        .mul_func        = ort_math_frontend_mul_double,
84
        .mul_scalar_func = ort_math_frontend_mul_scalar_double,
85

86
        .ceil_func       = ort_math_frontend_ceil_double,
87
        .floor_func      = ort_math_frontend_floor_double,
88
        .round_func      = ort_math_frontend_round_double,
89
        .abs_func        = ort_math_frontend_abs_double,
90
        .sqrt_func       = ort_math_frontend_sqrt_double,
91
        .neg_func        = ort_math_frontend_neg_double,
92
        .recip_func      = ort_math_frontend_recip_double,
93
        .sign_func       = ort_math_frontend_sign_double,
94
        .trunc_func      = ort_math_frontend_trunc_double,
95
        .dot_func        = ort_math_frontend_dot_double,
96
        .matmul_func     = ort_math_frontend_matmul_double,
97
        .sum_func        = ort_math_frontend_sum_double,
98
        .sum_axis_func   = ort_math_frontend_sum_axis_double,
99
        .min_func        = ort_math_frontend_min_double,
100
        .min_axis_func   = ort_math_frontend_min_axis_double,
101
        .max_func        = ort_math_frontend_max_double,
102
        .max_axis_func   = ort_math_frontend_max_axis_double,
103
        .mean_func       = ort_math_frontend_mean_double,
104
        .mean_axis_func  = ort_math_frontend_mean_axis_double,
105
        .softmax_axis_func = ort_math_frontend_softmax_axis_double,
106
        .argmax_func     = ort_math_frontend_argmax_double,
107
        .argmax_axis_func = ort_math_frontend_argmax_axis_double,
108
        .mod_func        = ort_math_frontend_mod_double,
109
        .mod_scalar_func = ort_math_frontend_mod_scalar_double,
110

111
        .pow_func        = ort_math_frontend_pow_double,
112
        .pow_scalar_func = ort_math_frontend_pow_scalar_double,
113
    },
114
    /* INT8 */
115
    {
116
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8,
117
        .add_func        = ort_math_frontend_add_int8_t,
118
        .add_scalar_func = ort_math_frontend_add_scalar_int8_t,
119

120
        .div_func        = NULL,
121
        .div_scalar_func = NULL,
122

123
        .sub_func        = ort_math_frontend_sub_int8_t,
124
        .sub_scalar_func = ort_math_frontend_sub_scalar_int8_t,
125

126
        .mul_func        = ort_math_frontend_mul_int8_t,
127
        .mul_scalar_func = ort_math_frontend_mul_scalar_int8_t,
128

129
        .ceil_func       = ort_math_frontend_ceil_int8_t,
130
        .floor_func      = ort_math_frontend_floor_int8_t,
131
        .round_func      = ort_math_frontend_round_int8_t,
132
        .abs_func        = ort_math_frontend_abs_int8_t,
133
        .sqrt_func       = NULL,
134
        .neg_func        = ort_math_frontend_neg_int8_t,
135
        .recip_func      = NULL,
136
        .sign_func       = ort_math_frontend_sign_int8_t,
137
        .trunc_func      = ort_math_frontend_trunc_int8_t,
138
        .dot_func        = ort_math_frontend_dot_int8_t,
139
        .matmul_func     = ort_math_frontend_matmul_int8_t,
140
        .sum_func        = NULL,
141
        .sum_axis_func   = NULL,
142
        .min_func        = ort_math_frontend_min_int8_t,
143
        .min_axis_func   = ort_math_frontend_min_axis_int8_t,
144
        .max_func        = ort_math_frontend_max_int8_t,
145
        .max_axis_func   = ort_math_frontend_max_axis_int8_t,
146
        .mean_func       = NULL,
147
        .mean_axis_func  = NULL,
148
        .softmax_axis_func = NULL,
149
        .argmax_func     = ort_math_frontend_argmax_int8_t,
150
        .argmax_axis_func = ort_math_frontend_argmax_axis_int8_t,
151

152
        .mod_func        = ort_math_frontend_mod_int8_t,
153
        .mod_scalar_func = ort_math_frontend_mod_scalar_int8_t,
154

155
        .pow_func        = ort_math_frontend_pow_int8_t,
156
        .pow_scalar_func = ort_math_frontend_pow_scalar_int8_t,
157
    },
158
    /* INT16 */
159
    {
160
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16,
161
        .add_func        = ort_math_frontend_add_int16_t,
162
        .add_scalar_func = ort_math_frontend_add_scalar_int16_t,
163

164
        .div_func        = NULL,
165
        .div_scalar_func = NULL,
166

167
        .sub_func        = ort_math_frontend_sub_int16_t,
168
        .sub_scalar_func = ort_math_frontend_sub_scalar_int16_t,
169
    
170
        .mul_func        = ort_math_frontend_mul_int16_t,
171
        .mul_scalar_func = ort_math_frontend_mul_scalar_int16_t,
172

173
        .ceil_func       = ort_math_frontend_ceil_int16_t,
174
        .floor_func      = ort_math_frontend_floor_int16_t,
175
        .round_func      = ort_math_frontend_round_int16_t,
176
        .abs_func        = ort_math_frontend_abs_int16_t,
177
        .sqrt_func       = NULL,
178
        .neg_func        = ort_math_frontend_neg_int16_t,
179
        .recip_func      = NULL,
180
        .sign_func       = ort_math_frontend_sign_int16_t,
181
        .trunc_func      = ort_math_frontend_trunc_int16_t,
182
        .dot_func        = ort_math_frontend_dot_int16_t,
183
        .matmul_func     = ort_math_frontend_matmul_int16_t,
184
        .sum_func        = NULL,
185
        .sum_axis_func   = NULL,
186
        .min_func        = ort_math_frontend_min_int16_t,
187
        .min_axis_func   = ort_math_frontend_min_axis_int16_t,
188
        .max_func        = ort_math_frontend_max_int16_t,
189
        .max_axis_func   = ort_math_frontend_max_axis_int16_t,
190
        .mean_func       = NULL,
191
        .mean_axis_func  = NULL,
192
        .softmax_axis_func = NULL,
193

194
        .argmax_func     = ort_math_frontend_argmax_int16_t,
195
        .argmax_axis_func = ort_math_frontend_argmax_axis_int16_t,
196

197
        .mod_func        = ort_math_frontend_mod_int16_t,
198
        .mod_scalar_func = ort_math_frontend_mod_scalar_int16_t,
199

200
        .pow_func        = ort_math_frontend_pow_int16_t,
201
        .pow_scalar_func = ort_math_frontend_pow_scalar_int16_t,
202
    },
203
    /* INT32 */
204
    {
205
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32,
206
        .add_func        = ort_math_frontend_add_int32_t,
207
        .add_scalar_func = ort_math_frontend_add_scalar_int32_t,
208

209
        .div_func        = NULL,
210
        .div_scalar_func = NULL,
211

212
        .sub_func        = ort_math_frontend_sub_int32_t,
213
        .sub_scalar_func = ort_math_frontend_sub_scalar_int32_t,
214

215
        .mul_func        = ort_math_frontend_mul_int32_t,
216
        .mul_scalar_func = ort_math_frontend_mul_scalar_int32_t,
217

218
        .ceil_func       = ort_math_frontend_ceil_int32_t,
219
        .floor_func      = ort_math_frontend_floor_int32_t,
220
        .round_func      = ort_math_frontend_round_int32_t,
221
        .abs_func        = ort_math_frontend_abs_int32_t,
222
        .sqrt_func       = NULL,
223
        .neg_func        = ort_math_frontend_neg_int32_t,
224
        .recip_func      = NULL,
225
        .sign_func       = ort_math_frontend_sign_int32_t,
226
        .trunc_func      = ort_math_frontend_trunc_int32_t,
227
        .dot_func        = ort_math_frontend_dot_int32_t,
228
        .matmul_func     = ort_math_frontend_matmul_int32_t,
229
        .sum_func        = NULL,
230
        .sum_axis_func   = NULL,
231
        .min_func        = ort_math_frontend_min_int32_t,
232
        .min_axis_func   = ort_math_frontend_min_axis_int32_t,
233
        .max_func        = ort_math_frontend_max_int32_t,
234
        .max_axis_func   = ort_math_frontend_max_axis_int32_t,
235
        .mean_func       = NULL,
236
        .mean_axis_func  = NULL,
237
        .softmax_axis_func = NULL,
238

239
        .argmax_func     = ort_math_frontend_argmax_int32_t,
240
        .argmax_axis_func = ort_math_frontend_argmax_axis_int32_t,
241

242
        .mod_func        = ort_math_frontend_mod_int32_t,
243
        .mod_scalar_func = ort_math_frontend_mod_scalar_int32_t,
244

245
        .pow_func        = ort_math_frontend_pow_int32_t,
246
        .pow_scalar_func = ort_math_frontend_pow_scalar_int32_t,
247
    },
248
    /* INT64 */
249
    {
250
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64,
251
        .add_func        = ort_math_frontend_add_int64_t,
252
        .add_scalar_func = ort_math_frontend_add_scalar_int64_t,
253

254
        .sub_func        = ort_math_frontend_sub_int64_t,
255
        .sub_scalar_func = ort_math_frontend_sub_scalar_int64_t,
256

257
        .mul_func        = ort_math_frontend_mul_int64_t,
258
        .mul_scalar_func = ort_math_frontend_mul_scalar_int64_t,
259
    
260
        .div_func        = NULL,
261
        .div_scalar_func = NULL,
262
        .ceil_func       = ort_math_frontend_ceil_int64_t,
263
        .floor_func      = ort_math_frontend_floor_int64_t,
264
        .round_func      = ort_math_frontend_round_int64_t,
265
        .abs_func        = ort_math_frontend_abs_int64_t,
266
        .sqrt_func       = NULL,
267
        .neg_func        = ort_math_frontend_neg_int64_t,
268
        .recip_func      = NULL,
269
        .sign_func       = ort_math_frontend_sign_int64_t,
270
        .trunc_func      = ort_math_frontend_trunc_int64_t,
271
        .dot_func        = ort_math_frontend_dot_int64_t,
272
        .matmul_func     = ort_math_frontend_matmul_int64_t,
273
        .sum_func        = ort_math_frontend_sum_int64_t,
274
        .sum_axis_func   = ort_math_frontend_sum_axis_int64_t,
275
        .min_func        = ort_math_frontend_min_int64_t,
276
        .min_axis_func   = ort_math_frontend_min_axis_int64_t,
277
        .max_func        = ort_math_frontend_max_int64_t,
278
        .max_axis_func   = ort_math_frontend_max_axis_int64_t,
279
        .mean_func       = NULL,
280
        .mean_axis_func  = NULL,
281
        .softmax_axis_func = NULL,
282
        .argmax_func     = ort_math_frontend_argmax_int64_t,
283
        .argmax_axis_func = ort_math_frontend_argmax_axis_int64_t,
284
        .mod_func        = ort_math_frontend_mod_int64_t,
285
        .mod_scalar_func = ort_math_frontend_mod_scalar_int64_t,
286

287
        .pow_func        = ort_math_frontend_pow_int64_t,
288
        .pow_scalar_func = ort_math_frontend_pow_scalar_int64_t,
289
    },
290
    /* UINT8 */
291
    {
292
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8,
293
        .add_func        = ort_math_frontend_add_uint8_t,
294
        .add_scalar_func = ort_math_frontend_add_scalar_uint8_t,
295

296
        .sub_func        = ort_math_frontend_sub_uint8_t,
297
        .sub_scalar_func = ort_math_frontend_sub_scalar_uint8_t,
298
    
299
        .mul_func        = ort_math_frontend_mul_uint8_t,
300
        .mul_scalar_func = ort_math_frontend_mul_scalar_uint8_t,
301
    
302
        .div_func        = NULL,
303
        .div_scalar_func = NULL,
304
        .ceil_func       = ort_math_frontend_ceil_uint8_t,
305
        .floor_func      = ort_math_frontend_floor_uint8_t,
306
        .round_func      = ort_math_frontend_round_uint8_t,
307
        .abs_func        = ort_math_frontend_abs_uint8_t,
308
        .sqrt_func       = NULL,
309
        .neg_func        = ort_math_frontend_neg_uint8_t,
310
        .recip_func      = NULL,
311
        .sign_func       = ort_math_frontend_sign_uint8_t,
312
        .trunc_func      = ort_math_frontend_trunc_uint8_t,
313
        .dot_func        = ort_math_frontend_dot_uint8_t,
314
        .matmul_func     = ort_math_frontend_matmul_uint8_t,
315
        .sum_func        = NULL,
316
        .sum_axis_func   = NULL,
317
        .min_func        = ort_math_frontend_min_uint8_t,
318
        .min_axis_func   = ort_math_frontend_min_axis_uint8_t,
319
        .max_func        = ort_math_frontend_max_uint8_t,
320
        .max_axis_func   = ort_math_frontend_max_axis_uint8_t,
321
        .mean_func       = NULL,
322
        .mean_axis_func  = NULL,
323
        .softmax_axis_func = NULL,
324

325
        .argmax_func     = ort_math_frontend_argmax_uint8_t,
326
        .argmax_axis_func = ort_math_frontend_argmax_axis_uint8_t,
327

328
        .mod_func        = ort_math_frontend_mod_uint8_t,
329
        .mod_scalar_func = ort_math_frontend_mod_scalar_uint8_t,
330

331
        .pow_func        = ort_math_frontend_pow_uint8_t,
332
        .pow_scalar_func = ort_math_frontend_pow_scalar_uint8_t,
333
    },
334
    /* UINT16 */
335
    {
336
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16,
337
        .add_func        = ort_math_frontend_add_uint16_t,
338
        .add_scalar_func = ort_math_frontend_add_scalar_uint16_t,
339

340
        .sub_func        = ort_math_frontend_sub_uint16_t,
341
        .sub_scalar_func = ort_math_frontend_sub_scalar_uint16_t,
342

343
        .mul_func        = ort_math_frontend_mul_uint16_t,
344
        .mul_scalar_func = ort_math_frontend_mul_scalar_uint16_t,
345

346
        .div_func        = NULL,
347
        .div_scalar_func = NULL,
348
        .ceil_func       = ort_math_frontend_ceil_uint16_t,
349
        .floor_func      = ort_math_frontend_floor_uint16_t,
350
        .round_func      = ort_math_frontend_round_uint16_t,
351
        .abs_func        = ort_math_frontend_abs_uint16_t,
352
        .sqrt_func       = NULL,
353
        .neg_func        = ort_math_frontend_neg_uint16_t,
354
        .recip_func      = NULL,
355
        .sign_func       = ort_math_frontend_sign_uint16_t,
356
        .trunc_func      = ort_math_frontend_trunc_uint16_t,
357
        .dot_func        = ort_math_frontend_dot_uint16_t,
358
        .matmul_func     = ort_math_frontend_matmul_uint16_t,
359
        .sum_func        = NULL,
360
        .sum_axis_func   = NULL,
361
        .min_func        = ort_math_frontend_min_uint16_t,
362
        .min_axis_func   = ort_math_frontend_min_axis_uint16_t,
363
        .max_func        = ort_math_frontend_max_uint16_t,
364
        .max_axis_func   = ort_math_frontend_max_axis_uint16_t,
365
        .mean_func       = NULL,
366
        .mean_axis_func  = NULL,
367
        .softmax_axis_func = NULL,
368

369
        .argmax_func     = ort_math_frontend_argmax_uint16_t,
370
        .argmax_axis_func = ort_math_frontend_argmax_axis_uint16_t,
371

372
        .mod_func        = ort_math_frontend_mod_uint16_t,
373
        .mod_scalar_func = ort_math_frontend_mod_scalar_uint16_t,
374

375
        .pow_func        = ort_math_frontend_pow_uint16_t,
376
        .pow_scalar_func = ort_math_frontend_pow_scalar_uint16_t,
377
    },
378
    /* UINT32 */
379
    {
380
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32,
381
        .add_func        = ort_math_frontend_add_uint32_t,
382
        .add_scalar_func = ort_math_frontend_add_scalar_uint32_t,
383

384
        .sub_func        = ort_math_frontend_sub_uint32_t,
385
        .sub_scalar_func = ort_math_frontend_sub_scalar_uint32_t,
386

387
        .mul_func        = ort_math_frontend_mul_uint32_t,
388
        .mul_scalar_func = ort_math_frontend_mul_scalar_uint32_t,
389

390
        .div_func        = NULL,
391
        .div_scalar_func = NULL,
392
        .ceil_func       = ort_math_frontend_ceil_uint32_t,
393
        .floor_func      = ort_math_frontend_floor_uint32_t,
394
        .round_func      = ort_math_frontend_round_uint32_t,
395
        .abs_func        = ort_math_frontend_abs_uint32_t,
396
        .sqrt_func       = NULL,
397
        .neg_func        = ort_math_frontend_neg_uint32_t,
398
        .recip_func      = NULL,
399
        .sign_func       = ort_math_frontend_sign_uint32_t,
400
        .trunc_func      = ort_math_frontend_trunc_uint32_t,
401
        .dot_func        = ort_math_frontend_dot_uint32_t,
402
        .matmul_func     = ort_math_frontend_matmul_uint32_t,
403
        .sum_func        = NULL,
404
        .sum_axis_func   = NULL,
405
        .min_func        = ort_math_frontend_min_uint32_t,
406
        .min_axis_func   = ort_math_frontend_min_axis_uint32_t,
407
        .max_func        = ort_math_frontend_max_uint32_t,
408
        .max_axis_func   = ort_math_frontend_max_axis_uint32_t,
409
        .mean_func       = NULL,
410
        .mean_axis_func  = NULL,
411
        .softmax_axis_func = NULL,
412
        .argmax_func     = ort_math_frontend_argmax_uint32_t,
413
        .argmax_axis_func = ort_math_frontend_argmax_axis_uint32_t,
414
        .mod_func        = ort_math_frontend_mod_uint32_t,
415
        .mod_scalar_func = ort_math_frontend_mod_scalar_uint32_t,
416

417
        .pow_func        = ort_math_frontend_pow_uint32_t,
418
        .pow_scalar_func = ort_math_frontend_pow_scalar_uint32_t,
419
    },
420
    /* BOOL */
421
    {
422
        .type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL,
423
        .add_func        = ort_math_frontend_add_zend_bool,          // Logical OR (or addition)
424
        .add_scalar_func = ort_math_frontend_add_scalar_zend_bool,   // Logical OR (or addition)
425

426
        .div_func        = NULL,          // Logical division (A && B)
427
        .div_scalar_func = NULL,          // Logical division (A && B)
428

429
        .sub_func        = NULL,                         // Logical XOR (or subtraction)
430
        .sub_scalar_func = NULL,                         // Logical XOR (or subtraction)
431
        .mul_func        = ort_math_frontend_mul_zend_bool,          // Logical AND (or multiplication)
432
        .mul_scalar_func = ort_math_frontend_mul_scalar_zend_bool,   // Logical AND (or multiplication)
433
        .ceil_func       = NULL,                         // Not meaningful for bool
434
        .floor_func      = NULL,                         // Not meaningful for bool
435
        .round_func      = NULL,                         // Not meaningful for bool
436
        .abs_func        = NULL,                         // Identity for bool
437
        .sqrt_func       = NULL,                         // Not meaningful for bool
438
        .neg_func        = ort_math_frontend_neg_zend_bool,         // Logical NOT
439
        .recip_func      = NULL,                         // Not meaningful for bool
440
        .sign_func       = NULL,                         // Identity for bool
441
        .trunc_func      = NULL,                         // Not meaningful for bool
442
        .dot_func        = NULL,
443
        .matmul_func     = NULL,
444
        .sum_func        = NULL,
445
        .sum_axis_func   = NULL,
446
        .min_func        = ort_math_frontend_min_zend_bool,
447
        .min_axis_func   = ort_math_frontend_min_axis_zend_bool,
448
        .max_func        = ort_math_frontend_max_zend_bool,
449
        .max_axis_func   = ort_math_frontend_max_axis_zend_bool,
450
        .mean_func       = NULL,
451
        .mean_axis_func  = NULL,
452
        .softmax_axis_func = NULL,
453
        .argmax_func       = ort_math_frontend_argmax_zend_bool,       // Logical argmax (returns index of first true)
454
        .argmax_axis_func  = ort_math_frontend_argmax_axis_zend_bool, // Logical argmax along axis (returns index of first true along axis)
455
        .mod_func        = NULL,
456
        .mod_scalar_func = NULL,
457

458
        .pow_func        = NULL,                         // Logical power (A ** B)
459
        .pow_scalar_func = NULL,                         // Logical power (A ** B)  
460
    }
461
};
462

463
ort_math_dispatch_t* ort_math_dispatch_table(void) {
×
464
    return __ort_math_dispatch_table;
×
465
}
466

467
const ort_math_dispatch_t* ort_math_dispatch_type(
3,741✔
468
    ONNXTensorElementDataType type) {
469
    int16_t index = ort_math_dispatch_indexof(type);
3,741✔
470

471
    if (index == FAILURE) {
3,732✔
472
        memset(&__ort_math_dispatch_error,
9✔
473
            0, sizeof(ort_math_dispatch_t));
474
        return &__ort_math_dispatch_error;
9✔
475
    }
476

477
    return &__ort_math_dispatch_table[index];
3,732✔
478
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc