Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Define a minimal interface for plugins (functions and symbols to explicitly resolve) #141

Open
Tracked by #140
cedricchevalier19 opened this issue Jun 13, 2022 · 1 comment

Comments

@cedricchevalier19
Copy link
Member

No description provided.

@louis-goyard1
Copy link
Collaborator

louis-goyard1 commented Jun 13, 2022

Proposition (for the solver part of the backend):

A plugin shall provide an implementation (eg. PluginSolver) of the IInternalLinearSolver interface, and 4 additional functions to load classes through dlopen :

extern "C" {
  IInternalLinearSolver* createDefault()
  {
    return new PluginSolver();
  }
  
  IInternalLinearSolver* create(const Alien::BackEnd::Options& options)
  {
    return new PluginSolver(options);
  }

  void destroy(IInternalLinearSolver* p)
  {
    delete p;
  }

 BackEndId name() { return "pluginXX"; }
}

The name() function could be moved to IInternalLinearSolver::name()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants