1#undef __ae2f_MACRO_GENERATED
2#define __ae2f_MACRO_GENERATED 1
6#define ae2f_NEED_CLASS 0
9#undef __ae2f_MACRO_GENERATED
10#define __ae2f_MACRO_GENERATED 1
11#include <ae2f/Ann/Slp.core.h>
12#undef __ae2f_MACRO_GENERATED
13#define __ae2f_MACRO_GENERATED 1
14#include <ae2f/Ann/Slp.auto.h>
15#undef __ae2f_MACRO_GENERATED
16#define __ae2f_MACRO_GENERATED 1
20#define _clAtomAddF_tmpl(a, b, c, d, e) clAtomAddF_tmpl(d, e)
21#define _clAtomAddF(a, b, c, d) clAtomAddF(b, c, d)
24#define _clAtomAddF_t(__global, host_float_t) struct {
27 host_float_t m_fa[MAX(1
, 4
/ sizeof(host_float_t))];
28 uint m_u[(MAX(1
, sizeof(host_float_t) >> 2
))];
32 __global volatile uint* m_pchg;
33 __global volatile host_float_t* m_fp;
36}
39typedef _clAtomAddF_t(__global, host_float_t) clAtomAddF_t;
50)\
51{
52 if(sizeof((v_mem).m_atom[0
].m_f) < 4
) {
53 (v_mem).m_count = 4
/ sizeof((v_mem).m_atom[0
].m_f);
54 while((v_mem).m_count--) {
55 (v_mem).m_atom[0
].m_fa[(v_mem).m_count]
56 = (prm_dst)[(v_mem).m_count]
60 ((v_mem).m_atom)[0
].m_f = ((v_mem).m_atom)[1
].m_f = *(prm_dst);
63 ((v_mem).m_atom)[1
].m_f += (prm_val);
65 (v_mem).m_count = MAX(1
, (sizeof(((v_mem).m_atom[0
].m_f)) >> 2
));
66 while((v_mem).m_count--) {
67 (v_mem).m_U0.m_fp = (prm_dst);
68 (v_mem).m_U0.m_pchg += (v_mem).m_count;
71 , (v_mem).m_atom[1
].m_u[(v_mem).m_count]
74}
77#define _clSlpPredict_t _clAtomAddF_t
78typedef clAtomAddF_t clSlpPredict_t;
97)\
98{
99 if((oidx) < (osz) && (iidx) < (isz)) {
100 unless((iidx)) (loc)[oidx] = 0
;
102 if(sizeof((v_mem).m_atom[0
].m_f) >= 4
) {
104 , v_mem, &(loc)[oidx]
105 , (p_weight)[(oidx) * (isz) + (iidx)] * (p_inp)[iidx]
109 (v_mem).m_atom[0
].m_u[0
] =
112 (v_mem).m_atom[1
].m_fa[0
]
113 = (v_mem).m_atom[1
].m_fa[0
]
114 + (p_weight)[(oidx) * (isz) + (iidx)] * (p_inp)[iidx]
117 if((oidx) + 1
< (osz))
118 (v_mem).m_atom[1
].m_fa[1
]
119 = (v_mem).m_atom[1
].m_fa[1
]
120 + (p_weight)[((oidx) + 1
) * (isz) + (iidx)] * (p_inp)[iidx]
123 atom_xchg_u(CAST(__global uint*, loc), (v_mem).m_atom[1
].m_u[0
]);
128 (loc)[oidx] += (p_bias)[oidx];
129 ACT(&(ret), (loc), oidx, osz);
133}
138#undef __ae2f_MACRO_GENERATED
140#define __ae2f_MACRO_GENERATED 0
#define ae2f_structdef(key, name)
#define unless(...)
Invokes when condition is false.
#define __ae2f_MACRO_GENERATED
#define ACT(layer_idx, r, y, i, c)
#define ACT_DERIV(layer_idx, r, y, i, c)
#define __ae2f_AnnSlpFetchDeltaOne_imp(rret, ptr_tmp0, ptr_tmp1, prm_out, prm_out_desired, prm_oidx, prm_osz, fn_actderiv, fn_lossderiv)
#define __ae2f_AnnSlpFollowOneW_imp(inp, delta, weight, learningrate, inp_sz, inp_idx, out_sz, out_idx)
#define __ae2f_AnnSlpFollowOneB_imp(rret_bias, prm_delta, prm_learningrate_bias)
#define _clMlpGetHD1(__global, v_mem, r_delta_then, i_weight, i_delta, i_iidx, i_isz, i_oidx, i_osz)
#define _clMlpRvrse(v_tmp, r_delta_then, i_oidx, i_iidx, i_isz, i_actderiv_then, i_inp, i_deltaseed)
#define _clAtomAddF(__global, v_mem, prm_dst, prm_val)
#define _clAtomAddF_t(__global, host_float_t)
#define _clSlpPredict(__global, v_mem, ret, loc, p_inp, p_weight, p_bias, iidx, isz, oidx, osz, ACT)