int operator_b(void) { double x, y; struct QX(Fermion) *fermion_x; struct QX(Fermion) *fermion_y; if (QOP_MDWF_allocate_fermion(&fermion_x, gauge->state)) { zprint("operator_1/B B (): alloc 1 failed"); return 1; } if (QOP_MDWF_allocate_fermion(&fermion_y, gauge->state)) { zprint("operator_1/B B (): alloc 2 failed"); return 1; } op_B(fermion_x, params, fermion_a); op_B1(fermion_y, params, fermion_x); dot_fermion(&x, &y, fermion_b, fermion_y); QOP_MDWF_free_fermion(&fermion_x); QOP_MDWF_free_fermion(&fermion_y); zprint("identity: %20.10e %20.10e", x, y); return 0; }
void interpret(uint16_t opcode){ int firstnibble = (opcode & 0xF000) >> 12; switch(firstnibble){ case 0: op_0(opcode); break; case 1: op_1(opcode); break; case 2: op_2(opcode); break; case 3: op_3(opcode); break; case 4: op_4(opcode); break; case 5: op_5(opcode); break; case 6: op_6(opcode); break; case 7: op_7(opcode); break; case 8: op_8(opcode); break; case 9: op_9(opcode); break; case 0xA: op_A(opcode); break; case 0xB: op_B(opcode); break; case 0xC: op_C(opcode); break; case 0xD: op_D(opcode); break; case 0xE: op_E(opcode); break; case 0xF: op_F(opcode); break; } }
int operator(void) { return op_B(result, params, fermion); }