21#ifndef __CTX_ASSEMBLER_H__
22#define __CTX_ASSEMBLER_H__
47 CTX_EXPORT gzVoid
disasm(gzBool addComment = TRUE, gzBool addOffset = TRUE, gzMessageLevel level=GZ_MESSAGE_DEBUG);
49 CTX_EXPORT static gzVoid
disasm(
const gzUInt32* commands, gzUInt32 len, gzBool addComment = TRUE, gzBool addOffset = TRUE, gzMessageLevel level = GZ_MESSAGE_DEBUG);
51 CTX_EXPORT static gzVoid
disasm(gzSerializeAdapter* adapter,
const gzUInt32* commands , gzUInt32 len, gzBool addComment = TRUE, gzBool addOffset = TRUE);
53 CTX_EXPORT gzVoid
disasm(gzSerializeAdapter* adapter, gzBool addComment = TRUE, gzBool addOffset = TRUE);
57 CTX_EXPORT static gzVoid
disasmSubRoutine(
const gzUInt32* commands, gzArray<ctxCommandBufferSubRoutine>& subroutines, gzBool showInstructions = FALSE, gzBool showThreadInfo = FALSE, gzInt32 targetPass = -1,gzMessageLevel level = GZ_MESSAGE_DEBUG);
59 CTX_EXPORT static gzVoid
disasmSubRoutine(gzSerializeAdapter* adapter,
const gzUInt32* commands, gzArray<ctxCommandBufferSubRoutine>& subroutines, gzBool showInstructions=FALSE, gzBool showThreadInfo=FALSE, gzInt32 targetPass=-1);
135 CTX_EXPORT gzVoid
gradient_update(
const gzUInt32& param_reg_index,
const gzUInt32& delta_reg_index,gzBool use_lambda,
const gzUInt32& depth_level);
163 gzRefList<gzRefData<gzDynamicArray<gzUInt32>>> m_instrList;
165 gzUInt64 m_breakInstruction=0;
167 gzUInt32 m_instructions = 0;
gzVoid recall_input_byte(const gzUInt32 &input_reg_index)
gzVoid collect_delta_sum()
gzVoid recall_page_delta(const gzUInt32 &delta_reg_index, const gzInt32 &page_offset)
gzVoid sum_n(const gzUInt32 &n)
gzVoid nfu(const ctxNeuronType &neuron)
gzVoid store_value(const gzUInt32 &value_reg_index)
gzVoid recall_delta_sum(const gzUInt32 &delta_sum_reg_index)
gzVoid max_n(const gzUInt32 &n)
gzVoid store_source(const gzUInt32 ®ister_count, ctxRegistrySourceIndex register_source, const gzUInt32 ®ister_source_index, const gzUInt32 ®ister_source_stride)
gzVoid disasm(gzBool addComment=TRUE, gzBool addOffset=TRUE, gzMessageLevel level=GZ_MESSAGE_DEBUG)
gzUInt64 getInstructions() const
gzVoid store_temp(const gzUInt32 &temp_reg_index)
gzVoid store_general(const gzUInt32 &general_reg_index)
static gzVoid disasm(const gzUInt32 *commands, gzUInt32 len, gzBool addComment=TRUE, gzBool addOffset=TRUE, gzMessageLevel level=GZ_MESSAGE_DEBUG)
gzVoid finalize_delta(const gzUInt32 &wb_delta_reg_index)
gzVoid disasm(gzSerializeAdapter *adapter, gzBool addComment=TRUE, gzBool addOffset=TRUE)
gzVoid recall_page_value(const gzUInt32 &value_reg_index, const gzInt32 &page_offset)
gzVoid add_param(const gzUInt32 ¶m_reg_index)
gzVoid mul_param(const gzUInt32 ¶m_reg_index)
gzVoid recall_temp(const gzUInt32 &temp_reg_index)
gzBool importOpcodes(const gzUInt32 *code, gzUInt32 length, gzBool stopAtReturn=TRUE)
gzVoid mul_const(const gzFloat &constant)
gzVoid insertOpcode(const gzUInt32 &opcode)
gzBool getProgram(gzDynamicLargeArray< gzUInt32 > &program, gzBool clearProgram=TRUE)
gzVoid load(const gzFloat &constant)
gzVoid recall_value(const gzUInt32 &value_reg_index)
gzVoid recall_input(const gzUInt32 &input_reg_index)
gzVoid mad(const gzUInt32 ®ister_count, ctxRegistrySourceIndex register_a, const gzUInt32 ®ister_a_index, const gzUInt32 ®ister_a_stride, ctxRegistrySourceIndex register_b, const gzUInt32 ®ister_b_index, const gzUInt32 ®ister_b_stride)
static gzVoid disasmSubRoutine(const gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines, gzBool showInstructions=FALSE, gzBool showThreadInfo=FALSE, gzInt32 targetPass=-1, gzMessageLevel level=GZ_MESSAGE_DEBUG)
gzVoid update_wb(const gzUInt32 &wb_reg_index)
gzBool getProgram(gzDynamicArray< gzUInt32 > &program, gzBool clearProgram=TRUE)
gzVoid mul_n(const gzUInt32 &n)
gzVoid setBreakInstruction(gzUInt64 position)
gzVoid test_drop_value(const gzUInt32 &drop_reg_index)
gzVoid store_wb(const gzUInt32 &wb_reg_index)
gzVoid skip_n(const gzUInt32 &n)
gzVoid math(const ctxMathFuncType &func)
gzVoid finalize_param(const gzUInt32 ¶m_reg_index, const gzUInt32 &delta_count)
gzVoid recall_delta(const gzUInt32 &delta_reg_index)
gzVoid gradient_update(const gzUInt32 ¶m_reg_index, const gzUInt32 &delta_reg_index, gzBool use_lambda, const gzUInt32 &depth_level)
gzVoid recall_param(const gzUInt32 ¶m_reg_index)
static gzVoid disasm(gzSerializeAdapter *adapter, const gzUInt32 *commands, gzUInt32 len, gzBool addComment=TRUE, gzBool addOffset=TRUE)
gzVoid recall_expected(const gzUInt32 &expected_reg_index)
gzVoid clear_delta_sum(const gzUInt32 &delta_reg_index, const gzUInt32 &range)
gzVoid store_delta_sum(const gzUInt32 &delta_sum_reg_index)
gzVoid ndf(const ctxNeuronType &neuron)
gzVoid store_delta(const gzUInt32 &delta_reg_index)
gzUInt32 compileTempTokens(gzUInt32 command, gzUInt32 sum_count, gzUInt32 steps, gzUInt32 in_id, gzUInt32 shortToken)
gzVoid recall_general(const gzUInt32 &general_reg_index)
static gzVoid disasmSubRoutine(gzSerializeAdapter *adapter, const gzUInt32 *commands, gzArray< ctxCommandBufferSubRoutine > &subroutines, gzBool showInstructions=FALSE, gzBool showThreadInfo=FALSE, gzInt32 targetPass=-1)
gzVoid zero_drop_value(const gzUInt32 &drop_reg_index)
gzVoid recall_wb(const gzUInt32 &wb_reg_index)
gzVoid recall_source(const gzUInt32 ®ister_count, ctxRegistrySourceIndex register_source, const gzUInt32 ®ister_source_index, const gzUInt32 ®ister_source_stride)