ae2f_docs
Mlp.auto.h File Reference
#include <ae2fVK/Ann/Mlp.h>
#include <ae2fVK/Ann/Mlp.auto.h>
#include <ae2fVK/Ann/MlpSHADER.auto.h>
#include <ae2fVK/Ann/Slp.auto.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define __ae2f_MACRO_GENERATED   1
#define ae2fVK_Ann_Mlp_auto_h
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2f_MACRO_GENERATED   1
#define __ae2fVK_AnnMlpMk_imp(v_mk, iv_weight_opt, iv_bias_opt, iv_outstream_opt, iv_deltastream_opt, i_len_count, i_len, i_len_swap, i_prm_offset, i_extra, i_act, i_actderiv, i_lossderiv, i_learningrate, i_learningrate_bias, i_vkdev, i_vkmemprops, iv_vkalloccalls, i_vkcldeclaration, i_vkcldefinition)
 Make MLP with OpenCL compute shader.
#define __ae2fVK_AnnMlpClean_imp(v_mlp)
#define __ae2fVK_AnnMlpMapGoal_imp(v_map, iv_mlp, r_err, r_ptr)
#define __ae2fVK_AnnMlpUnMapGoal_imp(v_unmap, iv_mlp)
#define __ae2fVK_AnnMlpMapOutStream_imp(v_map, iv_mlp, r_err, r_ptr)
#define __ae2fVK_AnnMlpUnMapOutStream_imp(v_unmap, iv_mlp)
#define __ae2fVK_AnnMlpMapWB_imp(v_map, iv_mlp, r_err, r_ptrweight, r_ptrbias)
#define __ae2fVK_AnnMlpUnMapWB_imp(v_unmap, iv_mlp)
#define __ae2f_MACRO_GENERATED   0

Macro Definition Documentation

◆ __ae2f_MACRO_GENERATED [1/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [2/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [3/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [4/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [5/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [6/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [7/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [8/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [9/10]

#define __ae2f_MACRO_GENERATED   1

Definition at line 2 of file Mlp.auto.h.

◆ __ae2f_MACRO_GENERATED [10/10]

#define __ae2f_MACRO_GENERATED   0

Definition at line 2 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpClean_imp

#define __ae2fVK_AnnMlpClean_imp ( v_mlp)

tparam param

Definition at line 524 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpMapGoal_imp

#define __ae2fVK_AnnMlpMapGoal_imp ( v_map,
iv_mlp,
r_err,
r_ptr )
Value:
{ \
__ae2fVK_AnnSlpMapRangedGeneric_imp( \
, v_map \
, iv_mlp \
, r_err \
, r_ptr \
, __ae2fVK_AnnMlpGoalOff((iv_mlp).m_mlp.m_depth, (iv_mlp).m_mlp.m_outc) \
, __ae2fVK_AnnMlpGoalSz((iv_mlp).m_map.m_depth, (iv_mlp).m_mlp.m_outc) \
); \
}
ae2f_float ae2f_float_t
Definition Float.h:38
#define __ae2fVK_AnnMlpGoalSz(i_depth, i_outc)
Definition Mlp.core.h:151
#define __ae2fVK_AnnMlpGoalOff(i_depth, i_outc)
Definition Mlp.core.h:154
ae2fVK_AnnMlp iv_mlp
Definition Mlp.def.cc:585
ae2fVK_AnnMlp ae2f_err_t ae2f_float_t * r_ptr
Definition Mlp.def.cc:589
ae2fVK_AnnMlp ae2f_err_t r_err
Definition Mlp.def.cc:586

tparam param

Definition at line 604 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpMapOutStream_imp

#define __ae2fVK_AnnMlpMapOutStream_imp ( v_map,
iv_mlp,
r_err,
r_ptr )
Value:
{ \
__ae2fVK_AnnSlpMapRangedGeneric_imp( \
, v_map \
, iv_mlp \
, r_err \
, r_ptr \
, __ae2fVK_AnnMlpOutStreamOff((iv_mlp).m_mlp.m_depth, (iv_mlp).m_mlp.m_outc) \
, __ae2fVK_AnnMlpOutStreamSz((iv_mlp).m_mlp.m_depth, (iv_mlp).m_mlp.m_outc) \
); \
}
#define __ae2fVK_AnnMlpOutStreamSz(i_depth, i_outc)
Definition Mlp.core.h:127
#define __ae2fVK_AnnMlpOutStreamOff(i_depth, i_outc)
Definition Mlp.core.h:130

tparam param

Definition at line 643 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpMapWB_imp

#define __ae2fVK_AnnMlpMapWB_imp ( v_map,
iv_mlp,
r_err,
r_ptrweight,
r_ptrbias )
Value:
{ \
__ae2fVK_AnnSlpMapRangedGeneric_imp( \
, v_map \
, iv_mlp \
, r_err \
, sizeof(uint32_t) * (iv_mlp).m_mlp.m_depth \
+ sizeof(ae2f_float_t) * (iv_mlp).m_mlp.m_outc * (iv_mlp).m_mlp.m_depth \
, sizeof(ae2f_float_t) * (iv_mlp).m_mlp.m_outc * ((iv_mlp).m_mlp.m_outc + 1) * ((iv_mlp).m_mlp.m_depth - 1) \
); \
do { \
if(r_err) { \
assert(!"__ae2fVK_AnnSlpMapRangedGeneric_imp has failed."); \
break; \
} \
\
unless(r_ptrweight) { \
assert(!"__ae2fVK_AnnSlpMapRangedGeneric_imp went null."); \
break; \
} \
\
((iv_mlp).m_mlp.m_depth - 1) * \
(iv_mlp).m_mlp.m_outc * (iv_mlp).m_mlp.m_outc; \
\
} while(0); \
}
#define uint32_t
ae2fVK_AnnMlp ae2f_err_t ae2f_float_t ae2f_float_t * r_ptrbias
Definition Mlp.def.cc:652
ae2fVK_AnnMlp ae2f_err_t ae2f_float_t * r_ptrweight
Definition Mlp.def.cc:649

tparam param

Definition at line 682 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpMk_imp

Make MLP with OpenCL compute shader.

The shader itself is incomplete.
For using it you will need to define three macros as function.
Below is the required snippet.

#define ACT(const ae2f_float_t) -> ae2f_float_t
#define ACT_DERIV(const ae2f_float_t) -> ae2f_float_t
#define LOSS_DERIV( ae2f_float_t* retval const ae2f_float_t* const out , const ae2f_float_t* const out_desired , const size_t index , const size_t length_out_goal );

Parameters
vkcldeclaration
vkcldefinitiontparam param

Definition at line 65 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpUnMapGoal_imp

#define __ae2fVK_AnnMlpUnMapGoal_imp ( v_unmap,
iv_mlp )
Value:
{ \
__ae2fVK_AnnSlpUnMapRanged_imp( \
v_unmap \
, iv_mlp \
, __ae2fVK_AnnMlpGoalOff((iv_mlp).m_mlp.m_depth, (iv_mlp).m_mlp.m_outc) \
, __ae2fVK_AnnMlpGoalSz((iv_mlp).m_map.m_depth, (iv_mlp).m_mlp.m_outc) \
); \
}

tparam param

Definition at line 626 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpUnMapOutStream_imp

#define __ae2fVK_AnnMlpUnMapOutStream_imp ( v_unmap,
iv_mlp )
Value:
{ \
__ae2fVK_AnnSlpUnMapRanged_imp( \
v_unmap \
, iv_mlp \
, sizeof(uint32_t) * (iv_mlp).m_mlp.m_depth \
, sizeof(ae2f_float_t) * (iv_mlp).m_mlp.m_outc * (iv_mlp).m_mlp.m_depth \
); \
}

tparam param

Definition at line 665 of file Mlp.auto.h.

◆ __ae2fVK_AnnMlpUnMapWB_imp

#define __ae2fVK_AnnMlpUnMapWB_imp ( v_unmap,
iv_mlp )
Value:
{ \
__ae2fVK_AnnSlpUnMapRanged_imp( \
v_unmap \
, iv_mlp \
, sizeof(uint32_t) * (iv_mlp).m_mlp.m_depth \
+ sizeof(ae2f_float_t) * (iv_mlp).m_mlp.m_outc * (iv_mlp).m_mlp.m_depth \
, sizeof(ae2f_float_t) * (iv_mlp).m_mlp.m_outc * ((iv_mlp).m_mlp.m_outc + 1) * ((iv_mlp).m_mlp.m_depth - 1) \
); \
}

tparam param

Definition at line 723 of file Mlp.auto.h.

◆ ae2fVK_Ann_Mlp_auto_h

#define ae2fVK_Ann_Mlp_auto_h

Definition at line 6 of file Mlp.auto.h.