Up: Function Details


5.6 Binary operations with fields

Elementary binary functions on integers

Syntax QDP_I_eq_I_func_I(QDP_Int *r, QDP_Int *a, QDP_Int *b, subset);


Meaning r = a func b


func lshift, rshift, mod, max, min, or, and, xor

Elementary binary functions on reals

Syntax QDP_R_eq_R_func_R(QDP_Real *r, QDP_Real *a, QDP_Real *b, subset);


Meaning r = a func b


func mod, max, min, pow, atan2

Multiplying real by integer power of 2

Syntax QDP_R_eq_R_ldexp_I(QDP_Real *r, QDP_Real *a, QDP_Int *b, subset);


Meaning r = a * 2^b

Addition

Syntax QDP_T_eq_T_plus_T(Type *r, Type *a, Type *b, subset);
QDP_T_veq_T_plus_T(Type *r[], Type *a[], Type *b[], subset, int n);


Meaning r = a + b


Type I, R, C, V, H, D, M, P

Subtraction

Syntax QDP_T_eq_T_minus_T(Type *r, Type *a, Type *b, subset);
QDP_T_veq_T_minus_T(Type *r[], Type *a[], Type *b[], subset, int n);


Meaning r = a - b


Type I, R, C, V, H, D, M, P

Multiplication: uniform types

Syntax QDP_T_eqop_T_times_T(Type *r, Type *a, Type *b, subset);


Meaning r eqop a * b


Type I, R, C, P


eqop eq, peq, meq, eqm

Division of integer, real, and complex fields

Syntax QDP_T_eq_T_divide_T(Type *r, Type *a, Type *b, subset);


Meaning r = a / b


Type I, R, C

Left multiplication by color matrix

Syntax QDP_T_eqop_M_times_T(Type *r, QDP_ColorMatrix *a, Type *b, subset);
QDP_T_veqop_M_times_T(Type *r[], QDP_ColorMatrix *a[], Type *b[], subset, int n);


Meaning r eqop a * b


Type V, H, D, M, P


eqop eq, peq, meq, eqm

Left multiplication by adjoint of color matrix

Syntax QDP_T_eqop_Ma_times_T(Type *r, QDP_ColorMatrix *a, Type *b, subset);
QDP_T_veqop_Ma_times_T(Type *r[], QDP_ColorMatrix *a[], Type *b[], subset, int n);


Meaning r eqop adjoint(a) * b


Type V, H, D, M, P


eqop eq, peq, meq, eqm

Right multiplication by color matrix

Syntax QDP_P_eqop_P_times_M(QDP_DiracPropagator *r, QDP_DiracPropagator *a, QDP_ColorMatrix *b, subset);


Meaning r eqop a * b


eqop eq, peq, meq, eqm

Right multiplication by adjoint of color matrix

Syntax QDP_T_eqop_T_times_Ma(Type *r, Type *a, QDP_ColorMatrix *b, subset);


Meaning r eqop a * adjoint(b)


Type M, P


eqop eq, peq, meq, eqm

Adjoint of color matrix times adjoint of color matrix

Syntax QDP_M_eqop_Ma_times_Ma(QDP_ColorMatrix *r, QDP_ColorMatrix *a, QDP_ColorMatrix *b, subset);


Meaning r eqop adjoint(a) * adjoint(b)


eqop eq, peq, meq, eqm

Local inner product

Syntax QDP_C_eqop_T_dot_T(QDP_Complex *r, Type *a, Type *b, subset);


Meaning r eqop Tr adjoint(a) * b


eqop C, V, H, D, M, P


Type eq, peq, meq, eqm

Real part of local inner product

Syntax QDP_R_eqop_T_dot_T(QDP_Real *r, Type *a, Type *b, subset);


Meaning r eqop Re Tr adjoint(a) * b


eqop C, V, H, D, M, P


Type eq_re, peq_re, meq_re, eqm_re

Color matrix from outer product

Syntax QDP_M_eqop_V_times_Va(QDP_ColorMatrix *r, QDP_ColorVector *a, QDP_ColorVector *b, subset);
QDP_M_veqop_V_times_Va(QDP_ColorMatrix *r[], QDP_ColorVector *a[], QDP_ColorVector *b[], subset, int n);


Meaning r[i, j] eqop a[i] * b[j]


eqop eq, peq, meq, eqm