Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit 754963a

Browse files
committed
add generated code
1 parent c4203a8 commit 754963a

File tree

4 files changed

+832
-0
lines changed

4 files changed

+832
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#ifndef PLOVER_GENERATED_prelude
2+
#define PLOVER_GENERATED_prelude
3+
4+
5+
#include <assert.h>
6+
7+
#include <stdint.h>
8+
#include <stdbool.h>
9+
#include <inttypes.h>
10+
#ifndef COMMON_INT_TYPES
11+
#define COMMON_INT_TYPES
12+
/** \defgroup common_inttypes Integer types
13+
* Specified-width integer type definitions for shorter and nicer code.
14+
*
15+
* These should be used in preference to unspecified width types such as
16+
* `int` which can lead to portability issues between different platforms.
17+
* \{ */
18+
19+
/** Signed 8-bit integer. */
20+
typedef int8_t s8;
21+
/** Signed 16-bit integer. */
22+
typedef int16_t s16;
23+
/** Signed 32-bit integer. */
24+
typedef int32_t s32;
25+
/** Signed 64-bit integer. */
26+
typedef int64_t s64;
27+
/** Unsigned 8-bit integer. */
28+
typedef uint8_t u8;
29+
/** Unsigned 16-bit integer. */
30+
typedef uint16_t u16;
31+
/** Unsigned 32-bit integer. */
32+
typedef uint32_t u32;
33+
/** Unsigned 64-bit integer. */
34+
typedef uint64_t u64;
35+
36+
#endif
37+
38+
/** \} */
39+
40+
#include <float.h>
41+
#include <stdio.h>
42+
#include <stdlib.h>
43+
#include <math.h>
44+
int ipow(int base, int exp);
45+
double dipow(double base, int exp);
46+
double rand_uniform(void);
47+
double rand_normal (void);
48+
double norm (const s32 n, const double * v);
49+
void normalize (const s32 n, const double * v, double * result);
50+
void print_vec (const s32 n, const double * v);
51+
void print_mat (const s32 n, const s32 m, const double * A);
52+
s32 matrix_inv (const s32 n, const double * A, double * B);
53+
double det (const s32 n, const double * A);
54+
55+
56+
#endif /* PLOVER_GENERATED_prelude */

include/libswiftnav/plover/qr.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef PLOVER_GENERATED_qr
2+
#define PLOVER_GENERATED_qr
3+
4+
#include "libswiftnav/plover/prelude.h"
5+
6+
s8 qr_solve (const s32 m, const s32 n, double * A, double * b, double * solution, double * const residual);
7+
void qr_update (const s32 m, const s32 n, double * b, double * A);
8+
9+
10+
#endif /* PLOVER_GENERATED_qr */

0 commit comments

Comments
 (0)