ae2f_docs
Slp.auto.h File Reference

Go to the source code of this file.

Macros

#define __ae2f_MACRO_GENERATED   1
#define ae2f_Ann_Slp_c
#define __ae2f_AnnSlpDel   free
#define __ae2f_AnnSlpDel_C   free
#define __ae2f_AnnSlpInitInpSz_imp(...)
#define __ae2f_AnnSlpInit_imp(...)
#define __ae2f_AnnSlpInit(...)
#define __ae2f_AnnSlpInit_C   __ae2f_AnnSlpInit
#define __ae2f_AnnSlpMk_imp(...)
#define __ae2f_AnnSlpMk(...)
#define __ae2f_AnnSlpMk_C   __ae2f_AnnSlpMk
#define __ae2f_AnnSlpPredictOne_imp(v_predict, prm_in, weight, bias, act_opt, oidx, isz)
#define __ae2f_AnnSlpPredict_imp(v_predict, _this, prm_in, out, weight, bias, act_opt)
#define __ae2f_AnnSlpPredict(err_opt, _this, prm_in, out, weight, bias, act_opt)
#define __ae2f_AnnSlpPredict_C(...)
#define __ae2f_AnnSlpFollowOneW_imp(inp, delta, weight, learningrate, inp_sz, inp_idx, out_sz, out_idx)
 Weights.
#define __ae2f_AnnSlpFollowOneB_imp(r_bias, delta, learningrate_bias)
#define __ae2f_AnnSlpFollowOne_imp(v_follow, prm_in, delta, weight, learningrate, learningrate_bias, inp_sz, out_idx, v_bias)
#define __ae2f_AnnSlpFollow_imp(v_follow, _this, prm_in, delta, weight, bias, learningrate, learningrate_bias)
#define __ae2f_AnnSlpFollow(reterr_opt, _this, prm_in, delta, weight, bias, learningrate, learningrate_bias)
#define __ae2f_AnnSlpFollow_C(...)
#define __ae2f_AnnSlpFetchDeltaOne_imp(v_fetchdelta_0, v_fetchdelta_1, out, out_desired, actderiv_opt, lossderiv, retdelta, oidx, osz)
#define __ae2f_AnnSlpFetchDelta_imp(v_delta, slp, out, out_desired, actderiv_opt, lossderiv, retdelta)
#define __ae2f_AnnSlpFetchDelta(err, slp, out, out_desired, actderiv_opt, lossderiv, retdelta)
#define __ae2f_AnnSlpFetchDelta_C(...)
#define __ae2f_AnnSlpFitOne_imp(v_fit, inp, out, out_desired, weight, r_bias, r_cachedelta, actderiv_opt, lossderiv, learningrate, learningrate_bias, iidx, oidx, isz, osz)
#define __ae2f_AnnSlpFit_imp(v_fit, slp, inp, out, out_desired, weights, bias, cachedelta, actderiv_opt, lossderiv, learningrate, learningrate_bias)
#define __ae2f_AnnSlpFit(reterr_opt, _this, prm_inp, prm_out, prm_out_desired, weights, bias, cachedelta, actderiv_opt, lossderiv, learningrate, learningrate_bias)
#define __ae2f_AnnSlpFit_C(...)
#define __ae2f_AnnSlpTrainOne_imp(v_train, act, actderiv, lossderiv, inp, out_cache, out_desired, weight, v_bias, r_cachedelta, learningrate, learningrate_bias, oidx, osz, isz)
#define __ae2f_AnnSlpTrain_imp(v_train, slp, inp, out_cache, out_desired, weights, bias, cachedelta, act, actderiv, lossderiv, learningrate, learningrate_bias)
#define __ae2f_AnnSlpTrain_C    typedef char NO_ae2f_NEED_CLASS[-1]
#define __ae2f_AnnSlpTrain(err, slp, inp, out_cache, out_desired, weights, bias, cachedelta, act, actderiv, lossderiv, learningrate, learningrate_bias)
#define __ae2f_MACRO_GENERATED   0

Macro Definition Documentation

◆ __ae2f_AnnSlpDel

#define __ae2f_AnnSlpDel   free

for non-builds

Definition at line 21 of file Slp.auto.h.

◆ __ae2f_AnnSlpDel_C

#define __ae2f_AnnSlpDel_C   free

Definition at line 22 of file Slp.auto.h.

◆ __ae2f_AnnSlpFetchDelta

#define __ae2f_AnnSlpFetchDelta ( err,
slp,
out,
out_desired,
actderiv_opt,
lossderiv,
retdelta )
Value:
{ \
if((err) && *(err)) \
; \
else unless((slp) && (out) && (out_desired) && (retdelta)) \
else unless(lossderiv) \
\
else if(actderiv_opt) { \
ae2f_AnnSlpFetchDelta_t v_delta; \
__ae2f_AnnSlpFetchDelta_imp( \
v_delta, (*(slp)) \
, out, out_desired \
, actderiv_opt \
, retdelta \
); \
} else { \
ae2f_AnnSlpFetchDelta_t v_delta; \
__ae2f_AnnSlpFetchDelta_imp( \
v_delta, (*(slp)) \
, out, out_desired \
, , lossderiv \
, retdelta \
); \
} \
}
#define unless(...)
Invokes when condition is false.
Definition Cast.h:103
ae2f_err_t err[1]
Definition MlpTrainXOR.c:40
ae2f_float_t *const ae2f_float_t *const ae2f_float_t *const const uint32_t const uint32_t ae2f_opt const size_t ae2f_opt const size_t ae2f_opt ae2f_AnnAct_t *const ae2f_opt ae2f_AnnAct_t *const ae2f_AnnLoss_t *const lossderiv
const ae2f_AnnSlp_t slp
Definition Mlp.def.cc:484
const ae2f_AnnMlp_t const ae2f_float_t *const ae2f_float_t *const out
Definition Mlp.def.cc:320
#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

tparam param

Definition at line 563 of file Slp.auto.h.

◆ __ae2f_AnnSlpFetchDelta_C

#define __ae2f_AnnSlpFetchDelta_C ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 645 of file Slp.auto.h.

◆ __ae2f_AnnSlpFetchDelta_imp

#define __ae2f_AnnSlpFetchDelta_imp ( v_delta,
slp,
out,
out_desired,
actderiv_opt,
lossderiv,
retdelta )
Value:
{ \
for((v_delta).m_i = (slp).m_outc; (v_delta).m_i--; ) \
(v_delta).m_tmp, (v_delta).m_tmp1 \
, out, out_desired \
, actderiv_opt, lossderiv \
, (retdelta)[v_delta.m_i] \
, (v_delta).m_i \
, (slp).m_outc \
); \
}
v_predict m_outc
Definition Mlp.def.cc:334
#define __ae2f_AnnSlpFetchDeltaOne_imp(v_fetchdelta_0, v_fetchdelta_1, out, out_desired, actderiv_opt, lossderiv, retdelta, oidx, osz)
Definition Slp.auto.h:513
v_mk m_U2 m_i
Definition Mlp.def.cc:177

tparam param

Definition at line 538 of file Slp.auto.h.

◆ __ae2f_AnnSlpFetchDeltaOne_imp

#define __ae2f_AnnSlpFetchDeltaOne_imp ( v_fetchdelta_0,
v_fetchdelta_1,
out,
out_desired,
actderiv_opt,
lossderiv,
retdelta,
oidx,
osz )
Value:
{ \
actderiv_opt(&(v_fetchdelta_0), (out)[oidx]); \
lossderiv((&(v_fetchdelta_1)), (out), (out_desired), (oidx), (osz)); \
\
(retdelta) = \
(v_fetchdelta_0) * \
(v_fetchdelta_1) \
; \
}
const ae2f_float_t *const const ae2f_float_t *const const ae2f_float_t ae2f_AnnAct_t const size_t oidx
Definition Slp.def.cc:230
ae2f_float_t *const const ae2f_float_t *const const ae2f_float_t *const const ae2f_float_t *const const size_t const size_t const size_t const size_t osz
Definition Slp.h:22

tparam param

Definition at line 513 of file Slp.auto.h.

◆ __ae2f_AnnSlpFit

#define __ae2f_AnnSlpFit ( reterr_opt,
_this,
prm_inp,
prm_out,
prm_out_desired,
weights,
bias,
cachedelta,
actderiv_opt,
lossderiv,
learningrate,
learningrate_bias )

tparam param

Definition at line 720 of file Slp.auto.h.

◆ __ae2f_AnnSlpFit_C

#define __ae2f_AnnSlpFit_C ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 817 of file Slp.auto.h.

◆ __ae2f_AnnSlpFit_imp

#define __ae2f_AnnSlpFit_imp ( v_fit,
slp,
inp,
out,
out_desired,
weights,
bias,
cachedelta,
actderiv_opt,
lossderiv,
learningrate,
learningrate_bias )
Value:
{ \
__ae2f_AnnSlpFetchDelta_imp( \
v_fit, slp \
, out, out_desired \
, actderiv_opt, lossderiv \
, cachedelta \
); \
\
__ae2f_AnnSlpFollow_imp( \
v_fit, slp, inp \
, cachedelta, weights, bias \
); \
}
ae2f_float_t *const ae2f_float_t *const ae2f_float_t *const const uint32_t const uint32_t ae2f_opt const size_t ae2f_opt const size_t ae2f_opt ae2f_AnnAct_t *const ae2f_opt ae2f_AnnAct_t *const ae2f_AnnLoss_t *const ae2f_float_t ae2f_float_t learningrate_bias
ae2f_float_t *const ae2f_float_t *const ae2f_float_t *const const uint32_t const uint32_t ae2f_opt const size_t ae2f_opt const size_t ae2f_opt ae2f_AnnAct_t *const ae2f_opt ae2f_AnnAct_t *const ae2f_AnnLoss_t *const ae2f_float_t learningrate
const ae2f_AnnMlp_t const ae2f_float_t *const inp
Definition Mlp.def.cc:318
const ae2f_AnnMlp_t const ae2f_float_t *const ae2f_float_t *const const size_t *const const ae2f_float_t *const const ae2f_float_t *const bias
Definition Mlp.def.cc:323

tparam param

Definition at line 687 of file Slp.auto.h.

◆ __ae2f_AnnSlpFitOne_imp

#define __ae2f_AnnSlpFitOne_imp ( v_fit,
inp,
out,
out_desired,
weight,
r_bias,
r_cachedelta,
actderiv_opt,
lossderiv,
learningrate,
learningrate_bias,
iidx,
oidx,
isz,
osz )
Value:
{ \
__ae2f_AnnSlpFetchDeltaOne_imp( \
(v_fit).m_tmp, (v_fit).m_tmp1 \
, out, out_desired \
, actderiv_opt, lossderiv \
, r_cachedelta \
, oidx, osz \
); \
\
\
__ae2f_AnnSlpFollowOne_imp( \
v_fit, inp, r_cachedelta, weight \
, isz, oidx, r_bias \
); \
}
#define r_bias
Definition Mlp.cl.c:60
const ae2f_AnnMlp_t const ae2f_float_t *const ae2f_float_t *const const size_t *const const ae2f_float_t *const weight
Definition Mlp.def.cc:322
const ae2f_float_t *const const ae2f_float_t *const const ae2f_float_t ae2f_AnnAct_t const size_t const size_t isz
Definition Slp.def.cc:232

tparam param

Definition at line 649 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollow

#define __ae2f_AnnSlpFollow ( reterr_opt,
_this,
prm_in,
delta,
weight,
bias,
learningrate,
learningrate_bias )
Value:
{ \
if((reterr_opt) && *(reterr_opt)) \
; \
else if(learningrate == 0 && learningrate_bias == 0) \
; \
else unless((_this) && (prm_in) && (delta) && (weight) && (bias)) \
(reterr_opt) && (*(reterr_opt) |= ae2f_errGlob_PTR_IS_NULL); \
else { \
ae2f_AnnSlpFollow_t v_follow; \
__ae2f_AnnSlpFollow_imp( \
v_follow \
, *(_this) \
, prm_in \
, delta \
, weight, bias \
); \
} \
}
const ae2f_AnnSlp_t const ae2f_float_t *const const ae2f_float_t *const delta
Definition Mlp.def.cc:486
const ae2f_AnnSlp_t _this
Definition Slp.def.cc:247
const ae2f_float_t *const prm_in
Definition Slp.def.cc:226

tparam param

Definition at line 449 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollow_C

#define __ae2f_AnnSlpFollow_C ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 509 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollow_imp

#define __ae2f_AnnSlpFollow_imp ( v_follow,
_this,
prm_in,
delta,
weight,
bias,
learningrate,
learningrate_bias )
Value:
{ \
for(v_follow.m_i = (_this).m_outc; (v_follow).m_i--; ) { \
__ae2f_AnnSlpFollowOne_imp( \
v_follow \
, prm_in \
, (delta)[v_follow.m_i] \
, ((weight)) \
, (_this).m_inc \
, (v_follow).m_i \
, (bias)[v_follow.m_i] \
); \
} \
}

tparam param

Definition at line 420 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollowOne_imp

#define __ae2f_AnnSlpFollowOne_imp ( v_follow,
prm_in,
delta,
weight,
learningrate,
learningrate_bias,
inp_sz,
out_idx,
v_bias )
Value:
{ \
for((v_follow).m_j = 0; (v_follow).m_j < (inp_sz); ++(v_follow).m_j) { \
((weight) + (inp_sz) * (out_idx))[(v_follow).m_j] \
-= (delta) * (prm_in)[(v_follow).m_j] * (learningrate); \
} \
\
(v_bias) -= (delta) * (learningrate_bias); \
}

tparam param

Definition at line 395 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollowOneB_imp

#define __ae2f_AnnSlpFollowOneB_imp ( r_bias,
delta,
learningrate_bias )
Value:

tparam param

Definition at line 385 of file Slp.auto.h.

◆ __ae2f_AnnSlpFollowOneW_imp

#define __ae2f_AnnSlpFollowOneW_imp ( inp,
delta,
weight,
learningrate,
inp_sz,
inp_idx,
out_sz,
out_idx )
Value:
{ \
((weight) + (inp_sz) * (out_idx))[(inp_idx)] \
-= (delta) * (inp) * (learningrate); \
}

Weights.

tparam param

Definition at line 366 of file Slp.auto.h.

◆ __ae2f_AnnSlpInit

#define __ae2f_AnnSlpInit ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 111 of file Slp.auto.h.

◆ __ae2f_AnnSlpInit_C

#define __ae2f_AnnSlpInit_C   __ae2f_AnnSlpInit

Definition at line 117 of file Slp.auto.h.

◆ __ae2f_AnnSlpInit_imp

#define __ae2f_AnnSlpInit_imp ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 107 of file Slp.auto.h.

◆ __ae2f_AnnSlpInitInpSz_imp

#define __ae2f_AnnSlpInitInpSz_imp ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 103 of file Slp.auto.h.

◆ __ae2f_AnnSlpMk

#define __ae2f_AnnSlpMk ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 236 of file Slp.auto.h.

◆ __ae2f_AnnSlpMk_C

#define __ae2f_AnnSlpMk_C   __ae2f_AnnSlpMk

Definition at line 240 of file Slp.auto.h.

◆ __ae2f_AnnSlpMk_imp

#define __ae2f_AnnSlpMk_imp ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 232 of file Slp.auto.h.

◆ __ae2f_AnnSlpPredict

#define __ae2f_AnnSlpPredict ( err_opt,
_this,
prm_in,
out,
weight,
bias,
act_opt )
Value:
{ \
if((err_opt) && *(err_opt)) \
; \
else unless((_this) && (prm_in) && (out) && (weight) && (bias)) \
else { \
ae2f_AnnSlpPredict_t v_predict; \
\
if(act_opt) { \
__ae2f_AnnSlpPredict_imp( \
(v_predict) \
, *(_this), (prm_in), out \
); \
} else { \
__ae2f_AnnSlpPredict_imp( \
(v_predict) \
, *(_this), prm_in, out \
, weight, bias, \
); \
} \
} \
}
const ae2f_AnnMlp_t const ae2f_float_t *const ae2f_float_t *const const size_t *const const ae2f_float_t *const const ae2f_float_t *const ae2f_float_t *const ae2f_AnnAct_t *const *const act_opt
Definition Mlp.def.cc:327
ae2f_SHAREDEXPORT void err_opt
Definition Slp.imp.c:22

tparam param

Definition at line 298 of file Slp.auto.h.

◆ __ae2f_AnnSlpPredict_C

#define __ae2f_AnnSlpPredict_C ( ...)
Value:
typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 361 of file Slp.auto.h.

◆ __ae2f_AnnSlpPredict_imp

#define __ae2f_AnnSlpPredict_imp ( v_predict,
_this,
prm_in,
out,
weight,
bias,
act_opt )
Value:
{ \
for((v_predict).m_i = (_this).m_outc; (v_predict).m_i--; ) \
{ \
__ae2f_AnnSlpPredictOne_imp( \
v_predict \
, prm_in \
, weight \
, (bias)[(v_predict).m_i] \
, act_opt \
, (v_predict).m_i \
, (_this).m_inc \
); \
\
(out)[(v_predict).m_i] = (v_predict).m_ret; \
} \
}
v_mapsz m_ret
Definition MMap.def.c:134
v_predict m_inc
Definition Mlp.def.cc:333

tparam param

Definition at line 268 of file Slp.auto.h.

◆ __ae2f_AnnSlpPredictOne_imp

#define __ae2f_AnnSlpPredictOne_imp ( v_predict,
prm_in,
weight,
bias,
act_opt,
oidx,
isz )
Value:
{ \
(v_predict).m_tmp = 0; \
\
for((v_predict).m_j = (isz); (v_predict).m_j--; ) { \
(v_predict).m_tmp \
+= (prm_in)[(v_predict).m_j] \
* ((weight) + (oidx) * (isz))[(v_predict).m_j]; \
} \
\
act_opt((&(v_predict).m_ret), ((v_predict).m_tmp + (bias))); \
}
Parameters
v_predicthas m_ret. That is the return value. tparam param

Definition at line 243 of file Slp.auto.h.

◆ __ae2f_AnnSlpTrain

#define __ae2f_AnnSlpTrain ( err,
slp,
inp,
out_cache,
out_desired,
weights,
bias,
cachedelta,
act,
actderiv,
lossderiv,
learningrate,
learningrate_bias )

tparam param

Definition at line 934 of file Slp.auto.h.

◆ __ae2f_AnnSlpTrain_C

#define __ae2f_AnnSlpTrain_C    typedef char NO_ae2f_NEED_CLASS[-1]

Definition at line 929 of file Slp.auto.h.

◆ __ae2f_AnnSlpTrain_imp

#define __ae2f_AnnSlpTrain_imp ( v_train,
slp,
inp,
out_cache,
out_desired,
weights,
bias,
cachedelta,
act,
actderiv,
lossderiv,
learningrate,
learningrate_bias )
Value:
{ \
__ae2f_AnnSlpPredict_imp(v_train, slp, inp, out_cache, weights, bias, act); \
__ae2f_AnnSlpFit_imp( \
v_train, slp, inp, out_cache, out_desired \
, weights, bias, cachedelta \
); \
}
ae2f_float_t *const ae2f_float_t *const ae2f_float_t *const const uint32_t const uint32_t ae2f_opt const size_t ae2f_opt const size_t ae2f_opt ae2f_AnnAct_t *const ae2f_opt ae2f_AnnAct_t *const actderiv
ae2f_float_t *const ae2f_float_t *const ae2f_float_t *const const uint32_t const uint32_t ae2f_opt const size_t ae2f_opt const size_t ae2f_opt ae2f_AnnAct_t *const act

tparam param

Definition at line 868 of file Slp.auto.h.

◆ __ae2f_AnnSlpTrainOne_imp

#define __ae2f_AnnSlpTrainOne_imp ( v_train,
act,
actderiv,
lossderiv,
inp,
out_cache,
out_desired,
weight,
v_bias,
r_cachedelta,
learningrate,
learningrate_bias,
oidx,
osz,
isz )
Value:
{ \
__ae2f_AnnSlpPredictOne_imp( \
v_train \
, inp \
, weight \
, v_bias \
, act \
, oidx \
, isz \
); \
\
(out_cache)[oidx] = (v_train).m_ret; \
\
__ae2f_AnnSlpFitOne_imp( \
v_train \
, inp \
, out_cache, out_desired \
, weight \
, v_bias \
, r_cachedelta \
, iidx, oidx, isz, osz \
); \
}
const ae2f_AnnSlp_t const ae2f_float_t *const const ae2f_float_t *const const size_t iidx
Definition Mlp.def.cc:488

tparam param

Definition at line 821 of file Slp.auto.h.

◆ __ae2f_MACRO_GENERATED [1/2]

#define __ae2f_MACRO_GENERATED   1

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

◆ __ae2f_MACRO_GENERATED [2/2]

#define __ae2f_MACRO_GENERATED   0

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

◆ ae2f_Ann_Slp_c

#define ae2f_Ann_Slp_c

Definition at line 10 of file Slp.auto.h.