ae2f_docs
Conv.h
1#ifndef ae2f_Ann_Conv_h
2#define ae2f_Ann_Conv_h
3
4#include <ae2f/Call.h>
5#include <ae2f/Cast.h>
6#include <ae2f/MMap/MMap.h>
7#include <ae2f/errGlob.h>
8
9#include <ae2f/Pack/Beg.h>
10
11/**
12 * @brief
13 * # Convolution Layer
14 *
15 * @param outv
16 * suggested initiated as 0.
17 * or they are being added.
18 * */
19static ae2f_err_t
20ae2f_AnnCnnConv1d(const ae2f_float_t *infv, size_t infc,
21 const ae2f_float_t *ingv, size_t ingc, ae2f_float_t *outv,
22 size_t *opt_outc, size_t stride, size_t pad) ae2f_noexcept;
23
24/**
25 * @brief
26 * `dim` must be the dimension of mmaps, lengths of lists.
27 * This function is meant to be recursive. For minimize the stack,
28 *
29 * @param infcc
30 * All elements in [infc] timed.
31 * If you set it to zero, it will calculate it for you.
32 *
33 * @param ingcc
34 * All elemtns in [ingc] timed.
35 * If you set it to zero, it will calculate it for you.
36 * */
37static ae2f_err_t ae2f_AnnCnnConv(
38 size_t dim, const ae2f_float_t *infv, const size_t *infc, size_t infcc,
39 const ae2f_float_t *ingv, const size_t *ingc, size_t ingcc,
40 ae2f_float_t *outv, size_t *outc_opt, size_t outcc,
41 const size_t *stride_opt, const size_t *pad_opt) ae2f_noexcept;
42
43/**
44 * @brief
45 * Pooling type.
46 * See @ref ae2f_AnnCnnPool
47 * */
48typedef enum ae2f_eAnnCnnPool {
49
50 /** @brief Max */
51 ae2f_eAnnCnnPool_MAX = 0b00,
52
53 /** @brief Min */
54 ae2f_eAnnCnnPool_MIN = 0b01,
55
56 /** @brief Add */
57 ae2f_eAnnCnnPool_ADD = 0b10,
58
59 /** @brief Average */
60 ae2f_eAnnCnnPool_AVG = 0b11,
61
62 /**
63 * @brief Middle. respect the output vector's value
64 * */
65 ae2f_eAnnCnnPool_MIDDLE = 0b100
66} ae2f_eAnnCnnPool;
67
68/**
69 * @brief
70 * # Pooling Layer
71 *
72 * @param outv
73 * Vectors are suggested initiated as 0.
74 * or they will affect the output itself.
75 *
76 * @param window size scanner
77 * @param stride size jumper
78 * */
79static ae2f_err_t
80ae2f_AnnCnnPool1d(const ae2f_float_t *inv, const size_t inc, ae2f_float_t *outv,
81 size_t *opt_outc, const size_t window_opt,
82 const size_t stride_opt, ae2f_eAnnCnnPool) ae2f_noexcept;
83
84/**
85 * @brief
86 * # Pooling layer
87 *
88 * @param incc Pass 0 and will be calculated automatically
89 * @param outcc Pass 0 and will be calculated automatically
90 * */
91static ae2f_err_t
92ae2f_AnnCnnPool_imp(size_t dim, const ae2f_float_t *inv, const size_t *inc,
93 size_t incc, ae2f_float_t *outv, size_t *opt_outc,
94 size_t outcc, const size_t *window_opt,
95 const size_t *stride_opt, ae2f_eAnnCnnPool type) ae2f_noexcept;
96
97static ae2f_err_t
98ae2f_AnnCnnPool(size_t dim, const ae2f_float_t *inv, const size_t *inc,
99 size_t incc, ae2f_float_t *outv, size_t *opt_outc, size_t outcc,
100 const size_t *window_opt, size_t windowcc,
101 const size_t *stride_opt, ae2f_eAnnCnnPool type) ae2f_noexcept;
102
103#include <ae2f/Pack/End.h>
104
105#include "./Conv.auto.h"
106
107#endif
#define ae2f_extern
Suggests the existence of external variable or function, in naming of C. [non-mangling].
Definition Cast.h:88
#define ae2f_CmpGetGt(a, b)
Definition Cmp.h:20
#define ae2f_CmpGetLs(a, b)
Definition Cmp.h:26
#define ae2f_errGlob_OK
The Operation you've wanted went successful.
Definition errGlob.h:23
#define ae2f_errGlob_WRONG_OPERATION
Found that parameter sent by programmer is invalid. The operation may have been ceased while the midd...
Definition errGlob.h:45
uint8_t ae2f_err_t
Informs that this number represents the error.
Definition errGlob.h:19
#define ae2f_errGlob_PTR_IS_NULL
Failed to refer the pointer either l-value inside the function.
Definition errGlob.h:32
#define ae2f_errGlob_IMP_NOT_FOUND
Failed to find the function on preprocessor which is callable for some reason No operation has beed d...
Definition errGlob.h:28
#define o
#define ae2f_mMMapDimLen(mmap,...)
Definition MMap.auto.h:104