about summary refs log tree commit diff
path: root/generator/pamtris/utils.h
blob: 3b7cfbe4496510a1411a56eda05a1b77f734af27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef UTIL_H_INCLUDED
#define UTIL_H_INCLUDED

#include "fract.h"

void
gen_steps(const int32_t * const begin,
          const int32_t * const end,
          fract *         const out,
          uint8_t         const elements,
          int32_t         const divisor);

void
step_up(fract *       const vars,
        const fract * const steps,
        uint8_t       const elements,
        int32_t       const divisor);

void
multi_step_up(fract *       const vars,
              const fract * const steps,
              uint8_t       const elements,
              int32_t       const times,
              int32_t       const divisor);

void
fract_to_int32_array(const fract * const in,
                     int32_t     * const out,
                     uint8_t       const elements);

void
int32_to_fract_array(const int32_t * const in,
                     fract *         const out,
                     uint8_t         const elements);

void
sort3(uint8_t *       const index_array,
      const int32_t * const y_array,
      const int32_t * const x_array);

#endif