1GLOBAL 2 base_opcode 200 3 encoder_headers "fooUtils.h" "fooBase.h" 4 5fooIsBuffer 6 dir stuff in 7 len stuff (4 * sizeof(float)) 8 param_check stuff if (n == NULL) { LOG(ERROR) << "NULL stuff"; return; } 9 10fooUnsupported 11 dir params in 12 flag unsupported 13 14fooDoEncoderFlush 15 flag flushOnEncode 16 17fooSetComplexStruct 18 dir obj in 19 len obj fooStructEncodingSize(obj) 20 custom_pack obj fooStructPack(ptr, obj) 21 custom_unpack obj FooStruct unpacked; inptr_obj_unpacked = (void*)(&unpacked); fooStructUnpack((unsigned char*)(inptr_obj.get()), size_obj, inptr_obj_unpacked) 22 23fooGetComplexStruct 24 dir obj out 25 len obj fooStructEncodingSize(obj) 26 custom_host_pack_tmp_alloc obj FooStruct tmp; forPacking_obj = (void*)tmp 27 custom_host_pack obj fooStructPack((unsigned char*)outptr_obj.get(), (FooStruct*)forPacking_obj) 28 custom_guest_unpack obj std::vector<unsigned char> forUnpacking_obj(__size_obj); stream->readback(&forUnpacking_obj[0], __size_obj); fooStructUnpack(&forUnpacking_obj[0], obj) 29 30fooInout 31 dir count inout 32 len count sizeof(uint32_t) 33