using marcos code for nnbp_gpu, nnff_gpu, nnapplygrads_gpu