← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
ckernel_runtime_extent.h
Go to the documentation of this file.
1#ifndef CKERNEL_RUNTIME_EXTENT_H
2#define CKERNEL_RUNTIME_EXTENT_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
17
18/* Sum a bounded prefix of int32 extents with an optional initial extent.
19 * count may be zero. The output is written only after every input and the
20 * accumulated result have been validated. No allocation or input mutation. */
22 const int32_t *values,
23 size_t value_elements,
24 size_t count,
25 int32_t min_value,
26 int32_t max_value,
27 size_t initial_extent,
28 size_t capacity,
29 int32_t *valid_extent);
30
31/* Multiply a computed valid extent by a positive integer factor. Reject
32 * overflow and capacity excess before publishing the output scalar. */
34 size_t source_extent,
35 size_t factor,
36 size_t capacity,
37 int32_t *valid_extent);
38
39/* Compute source_extent * factor + offset with checked arithmetic and a
40 * declared capacity. Failure leaves valid_extent untouched. */
42 size_t source_extent,
43 size_t factor,
44 size_t offset,
45 size_t capacity,
46 int32_t *valid_extent);
47
48/* Copy only the valid columns of channel-major FP32 rows. Physical row
49 * strides and buffer capacities are independent of valid_frames. The two
50 * buffers must not overlap. Invalid metadata leaves output untouched. */
52 const float *input,
53 size_t input_elements,
54 size_t channels,
55 size_t valid_frames,
56 size_t input_stride,
57 float *output,
58 size_t output_elements,
59 size_t output_stride);
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif
int ck_runtime_scale_i32_checked(size_t source_extent, size_t factor, size_t capacity, int32_t *valid_extent)
int ck_runtime_sum_i32_checked(const int32_t *values, size_t value_elements, size_t count, int32_t min_value, int32_t max_value, size_t initial_extent, size_t capacity, int32_t *valid_extent)
int ck_runtime_affine_i32_checked(size_t source_extent, size_t factor, size_t offset, size_t capacity, int32_t *valid_extent)
int ck_runtime_copy_valid_f32(const float *input, size_t input_elements, size_t channels, size_t valid_frames, size_t input_stride, float *output, size_t output_elements, size_t output_stride)
CKRuntimeExtentStatus
@ CK_RUNTIME_EXTENT_LIMIT
@ CK_RUNTIME_EXTENT_INVALID
@ CK_RUNTIME_EXTENT_OK
@ CK_RUNTIME_EXTENT_OVERFLOW
const uint8_t size_t count
Definition true_bpe.h:209