Relax encapsulation for more code reuse
Generalise BP to TRBP
TRBP on CUDA is now functional