[Metalab] NFP implementation in C++