-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathutils.hpp
More file actions
executable file
·29 lines (27 loc) · 1.3 KB
/
utils.hpp
File metadata and controls
executable file
·29 lines (27 loc) · 1.3 KB
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
#ifndef UTILS_H_
#define UTILS_H_
#include <string>
#include "xil_types.h"
class Utils
{
public:
static void stateDecoder(float ** state, std::string command);
static float** create2DArray(int r, int c);
static void clear(float** x, int r, int c);
static void clearIntegers(int** x, int r, int c);
static int** create2DArrayOfIntegers(int r, int c);
static void dot(float** result, float ** x, float ** y, int m, int n, int p);
static void sum(float ** x, float ** y, int r, int c);
static void copy(float ** x, float ** y, int r, int c);
static void distance(float** result, float ** x, int r, int c);
static void relu(float ** x, int r, int c);
static void scalar(float ** x, int r, int c , float alpha);
static void argMax(int** result, float **x, int r, int c, int axis);
static void transpose(float ** result, float ** x, int r, int c);
static void sigma(float** result, float ** x, int r, int c);
static void partialSum(float** result, float** px, int r, int c);
static void rewarder(float** reward, std::string command);
static void softmax(float** result, float ** x, int r, int c);
static u32 float2fix(float input);
};
#endif