def AcceptMoveCPP(it, g, a, x0, x1, vn, accepted):
vn[it] = -1 # perform spin-flip
L = len(vn)
b = 0.0
for s in range(2): # both members of pair need to be updated
b = a(s)/(1+a(s)(1-g(s,it,it)))
prefactorb = a/(1+a(1-g_pp))
for l in range(L):
x0(l) = g(s,l,it)
x1(l) = g(s,l,it)
x0(it) -= 1.
return_val = b;
g[s]=lib.blas.fblas.dger(b,x0,x1,a=g[s],overwrite_a=1)
return accepted+1