ae2f_docs
Slp.h
1#ifndef ae2fVK_Ann_Slp_h
2#define ae2fVK_Ann_Slp_h
3
4#include "./Slp.core.h"
5#include "./Slp.auto.h"
6#include "./SlpPool.auto.h"
7
8/**
9 * @brief
10 * Vulkan memory layout
11 * [WeightBuffer] [BiasBuffer] [DeltaCacheBuffer]
12 *
13 *
14 * */
15ae2f_structdef(struct, ae2fVK_AnnSlp)
16{
17 ae2f_AnnSlp m_slp;
18
19 VkDevice m_vkdev;
20 VkResult m_vkres;
21 VkBuffer m_vkglobbuf, m_vklocbuf;
22 VkDeviceMemory m_vkglobdevmem, m_vklocdevmem;
23
24 VkAllocationCallbacks* ae2f_restrict m_vkalloccalls;
25
26 VkDescriptorSetLayout m_vkdescsetlayout[ae2fVK_eAnnSlpDescLayouts_LEN];
27
28 VkPipelineLayout m_vkpipelayout[ae2fVK_eAnnSlpPipeLayouts_LEN];
29 VkShaderModule m_vkshadermodule;
30 VkPipeline m_vkpipeline[ae2fVK_eAnnSlpPipes_LEN];
31};
32
33/**
34 * @brief
35 * Descriptor Pool for ae2fVK_AnnSlp.
36 *
37 * @details
38 * Note that pool has maximum amount of ae2fVK_AnnSLpDescPoolCmd.
39 * */
40ae2f_structdef(struct, ae2fVK_AnnSlpDescPool)
41{
42 VkDescriptorPool m_vkdescpool;
43};
44/**
45 * @brief
46 * A command, descriptor set for one task.
47 * */
48ae2f_structdef(struct, ae2fVK_AnnSlpDescPoolCmd)
49{
50 VkDescriptorSet m_vkdescset;
51};
52
53#endif
#define ae2f_enumdef(name,...)
Definition Cast.h:111
#define ae2f_structdef(key, name)
Definition Cast.h:110
#define ae2f_const_cast(t, v)
Definition Cast.h:57
#define ae2f_static_cast(t, v)
Definition Cast.h:42
#define ae2f_reinterpret_cast(t, v)
Definition Cast.h:52
#define unless(...)
Invokes when condition is false.
Definition Cast.h:103
#define ae2f_opt
Definition Guide.h:26
#define ae2f_errGlob_OK
The Operation you've wanted went successful.
Definition errGlob.h:23
#define ae2f_errGlob_ALLOC_FAILED
stdlib allocating functions (malloc, calloc, realloc) has been failed.
Definition errGlob.h:40
#define ae2f_errGlob_NFOUND
Found some errors, but not by parameters. The operation has failed.
Definition errGlob.h:50
#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 __ae2f_MACRO_GENERATED
Definition Conv.auto.h:2
#define __ae2fVK_AnnMlpOutStreamSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:130
#define __ae2fVK_AnnMlpWeightOff(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:139
#define __ae2fVK_AnnMlpUnMapRanged_imp
Definition Mlp.core.h:171
#define __ae2fVK_AnnMlpGoalOff(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:157
#define __ae2fVK_AnnMlpMapRangedGeneric_imp
Definition Mlp.core.h:170
#define __ae2fVK_AnnMlpOutStreamOff(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:133
#define __ae2fVK_AnnMlpMdlOff(...)
Definition Mlp.core.h:128
#define __ae2fVK_AnnMlpBiasSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:142
#define __ae2fVK_AnnMlpMdlSz(i_depth,...)
Definition Mlp.core.h:125
#define __ae2fVK_AnnMlpGoalSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:154
#define __ae2fVK_AnnMlpDeltaStreamOff(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:151
#define __ae2fVK_AnnMlpGlobMemSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:160
#define __ae2fVK_AnnMlpBiasOff(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:145
#define __ae2fVK_AnnMlpDeltaStreamSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:148
#define __ae2fVK_AnnMlpWeightSz(i_depth, i_outc, i_weightc)
Definition Mlp.core.h:136
#define __ae2fVK_AnnSlpGoalSz(i_inp, i_out)
Definition Slp.core.h:198
#define __ae2fVK_AnnSlpGoalOff(i_inp, i_out)
Definition Slp.core.h:205
#define __ae2fVK_AnnSlpDeltaOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:185
#define __ae2fVK_AnnSlpGlobSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:190
#define __ae2fVK_AnnSlpOutSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:170
#define __ae2fVK_AnnSlpInpSz(i_inp,...)
Definition Slp.core.h:195
#define __ae2fVK_AnnSlpInpSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:169
#define __ae2fVK_AnnSlpBiasSz(i_inp, i_out)
Definition Slp.core.h:194
#define __ae2fVK_AnnSlpWeightSz(i_inp, i_out)
Definition Slp.core.h:193
#define __ae2fVK_AnnSlpInpOff(i_inp, i_out)
Definition Slp.core.h:202
#define __ae2fVK_AnnSlpGoalSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:172
#define __ae2fVK_AnnSlpDeltaSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:171
#define __ae2fVK_AnnSlpDeltaSz(i_inp, i_out)
Definition Slp.core.h:197
#define __ae2fVK_AnnSlpBiasSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:168
#define __ae2fVK_AnnSlpInpOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:179
#define __ae2fVK_AnnSlpWeightSz_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:167
#define __ae2fVK_AnnSlpWeightOff(i_inp, i_out)
Definition Slp.core.h:200
#define __ae2fVK_AnnSlpGlobSz(i_inp, i_out)
Definition Slp.core.h:207
#define __ae2fVK_AnnSlpOutSz(i_inp, i_out)
Definition Slp.core.h:196
#define __ae2fVK_AnnSlpWeightOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:174
#define __ae2fVK_AnnSlpOutOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:182
#define __ae2fVK_AnnSlpBiasOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:176
#define __ae2fVK_AnnSlpGoalOff_V(CLFLOAT, i_inp, i_out)
Definition Slp.core.h:187
#define __ae2fVK_AnnSlpDeltaOff(i_inp, i_out)
Definition Slp.core.h:204
#define ae2f_MAC_BUILD
Definition Util.h:5
#define ae2fVK_AnnMlpSHADER
#define __ae2fVK_AnnSlpDescPoolMk_imp(v_descpool, r_pool, r_reterr, iv_slp, i_vkdescpoolcreatflags, i_vkmaxdescsets)
#define __ae2fVK_AnnSlpDescPoolCmdClean_imp(iv_slp, i_pool, i_cmd)
#define __ae2fVK_AnnSlpDescPoolCmdMk_imp(COMMANDONRECORDING, v_cmdmk, r_cmd, iv_slp, i_pool, iv_err, i_desccount, i_offglob, i_szglob, i_offloc, i_szloc, i_desclayout, i_pipe, i_pipelayout, i_vkcmdbuf)
#define __ae2fVK_AnnSlpDescPoolClean_imp(i_slp, i_pool)
#define ae2fVK_AnnSlpSHADER
#define __ae2fVK_AnnMlpMk_imp_V(cllocfloat_t, 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)
Definition Mlp.auto.h:107
#define __ae2fVK_AnnSlpMkCLSPVVerbose_imp(r_handle, ir_err, i_first, i_second, i_third)
Definition Slp.auto.h:794
#define __ae2fVK_AnnSlpMapRangedGeneric_imp(T, v_vkmapmemrange, iv_slp, r_err, r_ptr, i_off, i_sz)
Definition Slp.auto.h:868
#define __ae2fVK_AnnSlpMkFndMemProp_imp(CMDONERR, r_memtypeidx, v_errbit, memtypeidx_invalid_minus_one, vkpropflag_req, vkphydevmemprops)
Definition Slp.auto.h:34
#define __ae2fVK_AnnSlpMkCreatBuf(CMDONERR, sz, r_vkres, r_vkbuf, v_vkbufcreatinfo, v_reterr, vkbufuseflags, vksharemode, vkdev, vkalloccalls)
Definition Slp.auto.h:65
#define __ae2fVK_AnnSlpMkLoadPipeCreat_imp(CMDONERR, r_reterr, pipecreat, pipelayout, shadermod, entrypoint, idx_pipe, idx_pipelayout)
Definition Slp.auto.h:208
#define __ae2fVK_AnnSlpCreatDescPoolVerbose_imp(v_vkdescpoolcreatinfo, v_vkdescpoolsz, r_vkdescpool, r_reterr, r_vkres, i_vkdev, i_vkptrAlloc, i_vkdescpoolcreatflags, i_vkdesctype, i_vkdescpoolsz_count, i_vkmaxdescsets)
Definition Slp.auto.h:321
#define __ae2fVK_AnnSlpMkOnePipeLayoutVerbose_imp(CMDONERR, v_vkpushconstrange, v_vkpipelayoutcreatinfo, r_reterr, iv_slpptr, idx, szrequired, vkalloccalls, vkdev)
Definition Slp.auto.h:247
#define __ae2fVK_AnnSlpUnMap_imp(slp)
Definition Slp.auto.h:929
#define __ae2fVK_AnnSlpUnMapRanged_imp(v_out, vi_slp, i_off, i_sz)
Definition Slp.auto.h:941
#define __ae2fVK_AnnSlpMk_imp_V(cllocfloat_t, v_mk, weight_opt, bias_opt, cache_opt, inc, outc, prm_offset, extra, act, actderiv, lossderiv, learningrate, learningrate_bias, vkdev, vkmemprops, vkalloccalls, vkcldeclaration, vkcldefinition)
Definition Slp.auto.h:428
#define __ae2fVK_AnnSlpMkAllocVKMem_imp(CMDONERR, sz, r_vkres, r_vkbuf, r_vkdevmem, v_errbit, v_vkbufcreatinfo, v_memallocinfo, vkbufuseflags, vksharemode, vkdev, v_vkmemreq, vkalloccalls, v_memtypeidx, memtypeidx_invalid_minus_one, vkpropflag_req, vkphydevmemprops)
Definition Slp.auto.h:109
#define __ae2f_AnnMlpMk_imp(reg_mk, prm_depth, pprm_szvector, propptr_szswap_opt, lppfn_act_opt, lppfn_actderiv_opt, pfn_lossderiv, propptr_deltastream_opt, propptr_outcache_opt, propptr_weight_opt, propptr_bias_opt, prm_learningrate, prm_learningrate_bias, prm_offset_opt, prm_extra_opt)
Automatically allocates ae2f_AnnMlp and store its pointer at (reg_mk).m_mkbase.
Definition Mlp.auto.h:163
#define __ae2f_AnnSlpMk_imp(...)
Definition Slp.auto.h:267
#define ae2f_MAC(...)
Definition mac.h:28