Skip to content

bug in nCompiler::compileNimble for full nfs #162

@paciorek

Description

@paciorek

In the test "compileNimble bridge works for one nimbleFunction object", we are not actually calling nCompiler:::compileNimble. So the test needs to be fixed. That's a side issue.

Main issue:

If we do invoke nCompiler:::compileNimble, there is a compilation error. We generate class definition code that looks like this:

class nfRefClass_R_GlobalEnv16 : public interface_resolver< genericInterfaceC<nfRefClass_R_GlobalEnv16> >, public loadedObjectHookC<nfRefClass_R_GlobalEnv16> {
public:
    double   (  ) ;
    void  nFun_3 ( SEXP NFobj ) ;
      nfRefClass_R_GlobalEnv16 (  ) ;
  Eigen::Tensor<int, 1> x;
};

The problem is that in the memberCppDefs, the $name element is being misassigned.

The name for the run function is missing, while nFun_3 is used as the name of copyFromNF. Hence double (); and void nFun_3 (SEXP NFobj);.

Still tracking down where the names are being assigned so I can fix that, but logging this now in case I don't have time to finish this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions