← Back to C-Kernel-Engine Docs Doxygen Source Documentation
 
Loading...
Searching...
No Matches
ckernel_audio_snake_checked.h
Go to the documentation of this file.
1#ifndef CKERNEL_AUDIO_SNAKE_CHECKED_H
2#define CKERNEL_AUDIO_SNAKE_CHECKED_H
3
4#include <stddef.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/* Channel-major Snake: y[c,t] = x[c,t] + sin(alpha[c] * x[c,t])^2 / alpha[c].
11 * All valid input and outputs are checked before output writes. Input, alpha,
12 * and output must be disjoint; physical row padding remains untouched.
13 * Returns 0 on success, -1 for invalid pointers/geometry, -2 for insufficient
14 * capacity or overflow, and -3 for nonfinite arithmetic or zero alpha. */
16 const float *input, size_t input_elements, size_t input_stride,
17 const float *alpha, size_t alpha_elements,
18 float *output, size_t output_elements, size_t output_stride,
19 size_t channels, size_t frames);
20
21#ifdef __cplusplus
22}
23#endif
24
25#endif
int audio_snake_strided_f32_checked(const float *input, size_t input_elements, size_t input_stride, const float *alpha, size_t alpha_elements, float *output, size_t output_elements, size_t output_stride, size_t channels, size_t frames)