copapy/stencils/aux_functions.c

20 lines
412 B
C

#include <stdint.h>
#include "stencil_helper.h"
volatile extern int dummy_int;
volatile extern float dummy_float;
int floor_div(float arg1, float arg2) {
float x = arg1 / arg2;
int i = (int)x;
if (x < 0 && x != (float)i) i -= 1;
return i;
}
NOINLINE float auxsub_get_42(int n) {
return n * 5.0f + 21.0f;
}
NOINLINE float aux_get_42(float n) {
return auxsub_get_42(n * 3.0f + 42.0f);
}