добавление bench_time и рефакторинг генетического алгоритма
This commit is contained in:
@@ -83,8 +83,8 @@
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00079}00079\ \textcolor{preprocessor}{\#define\ HF\_HandleFault(...)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00080}00080\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00081}00081\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00082}00082\ \textcolor{preprocessor}{\#ifdef\ INCLUDE\_EVOLVE\_OPTIMIZER}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00083}00083\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{evolve__optimizer_8h}{evolve\_optimizer.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00082}00082\ \textcolor{preprocessor}{\#ifdef\ INCLUDE\_GEN\_OPTIMIZER}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00083}00083\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{gen__optimizer_8h}{gen\_optimizer.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00084}00084\ \textcolor{preprocessor}{\#else}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00085}00085\ \textcolor{keyword}{typedef}\ \textcolor{keyword}{struct\ }\{}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00086}00086\ \ \ uint16\_t\ n\_params;\ }
|
||||
@@ -93,39 +93,55 @@
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00089}00089\ \ \ uint16\_t\ iq\_mutation;\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00090}00090\ \ \ int32\_t\ loss[0];\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00091}00091\ \ \ int32\_t\ candidates[0][0];\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00092}00092\ \}\ \mbox{\hyperlink{struct_evolve_optimizer__t}{EvolveOptimizer\_t}};}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00093}00093\ \textcolor{preprocessor}{\#define\ EvolveOptimizer\_Init(opt,\ n\_params,\ n\_cand,\ n\_best,\ iq\_mutation,\ start\_params)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00094}00094\ \textcolor{preprocessor}{\#define\ EvolveOptimizer\_Step(opt,\ params,\ LossFunc)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00092}00092\ \}\ \mbox{\hyperlink{struct_gen_optimizer__t}{GenOptimizer\_t}};}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00093}00093\ \textcolor{preprocessor}{\#define\ GenOptimizer\_Init(opt,\ n\_params,\ n\_cand,\ n\_best,\ iq\_mutation,\ start\_params)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00094}00094\ \textcolor{preprocessor}{\#define\ GenOptimizer\_Step(opt,\ params,\ LossFunc)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00095}00095\ \textcolor{preprocessor}{\#define\ PARAM\_SCALE\_Q16(x,\ min\_val,\ max\_val)\ \ \ \ \ \ \ \ \ \ \ \ (x)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00096}00096\ \textcolor{preprocessor}{\#define\ PARAM\_UNSCALE\_Q16(q16\_val,\ min\_val,\ max\_val)\ \ \ \ (q16\_val)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00097}00097\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00098}00098\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00099}00099\ \textcolor{preprocessor}{\#ifdef\ INCLUDE\_GENERAL\_PERIPH\_LIBS}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00099}00099\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00100}00100\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00101}00101\ \textcolor{preprocessor}{\#include\ "{}\_\_general\_flash.h"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00102}00102\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__gpio_8h}{general\_gpio.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00103}00103\ \textcolor{preprocessor}{\#ifdef\ HAL\_SPI\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00104}00104\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__spi_8h}{general\_spi.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00105}00105\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00106}00106\ \textcolor{preprocessor}{\#ifdef\ HAL\_UART\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00107}00107\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__uart_8h}{general\_uart.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00108}00108\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00109}00109\ \textcolor{preprocessor}{\#ifdef\ HAL\_TIM\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00110}00110\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__tim_8h}{general\_tim.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00111}00111\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00112}00112\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00113}00113\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//INCLUDE\_GENERAL\_PERIPH\_LIBS}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00101}00101\ \textcolor{preprocessor}{\#ifdef\ INCLUDE\_BENCH\_TEST}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00102}00102\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{bench__time_8h}{bench\_time.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00103}00103\ \textcolor{preprocessor}{\#else\ }\textcolor{comment}{//BENCH\_TIME\_ENABLE}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00104}00104\ \textcolor{preprocessor}{\#define\ BenchTime\_Init()}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00105}00105\ \textcolor{preprocessor}{\#define\ BenchTime\_Start(channel,\ ticks,\ tick\_period)\ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00106}00106\ \textcolor{preprocessor}{\#define\ BenchTime\_End(channel,\ ticks)\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00107}00107\ \textcolor{preprocessor}{\#define\ BenchTime\_GetMin(channel)\ \ \ \ \ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00108}00108\ \textcolor{preprocessor}{\#define\ BenchTime\_GetMax(channel)\ \ \ \ \ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00109}00109\ \textcolor{preprocessor}{\#define\ BenchTime\_GetAverage(channel)\ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00110}00110\ \textcolor{preprocessor}{\#define\ BenchTime\_GetCount(channel)\ \ \ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00111}00111\ \textcolor{preprocessor}{\#define\ BenchTime\_GetLast(channel)\ \ \ \ \ \ 0}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00112}00112\ \textcolor{preprocessor}{\#define\ BenchTime\_ResetStats(channel)}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00113}00113\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//BENCH\_TIME\_ENABLE}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00114}00114\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00115}00115\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00115}00115\ \textcolor{preprocessor}{\#ifdef\ INCLUDE\_GENERAL\_PERIPH\_LIBS}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00116}00116\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00117}00117\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00118}00118\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00119}00119\ \textcolor{comment}{//\ user\ includes}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00120}00120\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00121}00121\ \textcolor{comment}{//\ user\ settings}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00122}00122\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00123}00123\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00124}00124\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00125}00125\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_MYLIBS\_INCLUDE\_H\_}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00117}00117\ \textcolor{preprocessor}{\#include\ "{}\_\_general\_flash.h"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00118}00118\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__gpio_8h}{general\_gpio.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00119}00119\ \textcolor{preprocessor}{\#ifdef\ HAL\_SPI\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00120}00120\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__spi_8h}{general\_spi.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00121}00121\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00122}00122\ \textcolor{preprocessor}{\#ifdef\ HAL\_UART\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00123}00123\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__uart_8h}{general\_uart.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00124}00124\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00125}00125\ \textcolor{preprocessor}{\#ifdef\ HAL\_TIM\_MODULE\_ENABLED}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00126}00126\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{general__tim_8h}{general\_tim.h}}"{}}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00127}00127\ \textcolor{preprocessor}{\#endif}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00128}00128\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00129}00129\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//INCLUDE\_GENERAL\_PERIPH\_LIBS}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00130}00130\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00131}00131\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00132}00132\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00133}00133\ \textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00134}00134\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00135}00135\ \textcolor{comment}{//\ user\ includes}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00136}00136\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00137}00137\ \textcolor{comment}{//\ user\ settings}\textcolor{comment}{}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00138}00138\ \textcolor{comment}{/////////////////////////-\/-\/-\/USER\ SETTINGS-\/-\/-\//////////////////////////}}
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00139}00139\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00140}00140\ }
|
||||
\DoxyCodeLine{\Hypertarget{mylibs__include_8h_source_l00141}00141\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ \_\_MYLIBS\_INCLUDE\_H\_}}
|
||||
|
||||
\end{DoxyCode}
|
||||
|
||||
Reference in New Issue
Block a user