rsLQR
0.1
utils.h
Go to the documentation of this file.
1
11
#pragma once
12
13
#include <stdbool.h>
14
18
bool
IsPowerOfTwo
(
int
x);
19
23
static
inline
int
PowerOfTwo(
int
x) {
return
1 << x; }
24
25
void
ndlqr_LinAlgTimeStart();
26
void
ndlqr_LinAlgTimeStop();
27
31
int
LogOfTwo
(
int
x);
32
55
int
ReadFile
(
const
char
* filename,
char
** out,
int
* len);
ReadFile
int ReadFile(const char *filename, char **out, int *len)
Read the contents of a file into a heap-allocated char array.
Definition:
utils.c:17
IsPowerOfTwo
bool IsPowerOfTwo(int x)
Determines if the input integer is a power of 2.
Definition:
utils.c:7
LogOfTwo
int LogOfTwo(int x)
Efficient computation of log2(x) for integers.
Definition:
utils.c:9
src
utils.h
Generated by
1.8.17