Skip to content

Improvecompile#11

Open
pearsonca wants to merge 8 commits intomasterfrom
improvecompile
Open

Improvecompile#11
pearsonca wants to merge 8 commits intomasterfrom
improvecompile

Conversation

@pearsonca
Copy link
Copy Markdown
Collaborator

These revisions separate out forward declaring vs using the Eigen types.

The Eigen all-header conceit is actually a bit heavy when it comes to include / compile. By manually pre-declaring only what's needed (in the proposed pls/types.h), there can be relatively thin header files.

Eigen still needs to be included to actually instantiate any objects. This also has the effect of meaning that class definition can't depend on e.g. the size of objects of that type, which means using pointers / references for fields of the Eigen types.

This also means that downstream stuff using PLS will need to include Eigen explicitly if using Eigen methods, rather than getting everything from including (bloated) pls headers.

@pearsonca
Copy link
Copy Markdown
Collaborator Author

One mildly annoying thing that should probably go in this commit but I don't want to do now: interface to use PLS without having to invoke Eigen.

Part of the point of isolating the dependency is make it non-required; and we definitely could offer a vector + vector<vector<>> interface (which are then simply wrapped in Eigen, then passed to the other methods, with output then dropped back to vector + vector<vector<>>

If that were implemented, then people could use a compiled libpls without reference to Eigen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant