Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M miniff
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Quantum Tinkerer
  • miniff
  • Issues
  • #21

Closed
Open
Created Jan 18, 2021 by Artem Pulkin@pulkinMaintainer

Baking (compiling) fast efficient functions during runtime

Currently, bottleneck "potential" functions are compiled at the build time as a separate _potentials library. This may not be the optimal choice for those users who are willing to define their own potentials. Currently, they will have to modify package sources and to re-compile it. Another option is to implement compiling during runtime taking simple potential expressions as the input and producing fast library functions as the output.

Function stub example:

def build_potential(expression: str, inputs: Iterable, type: str, openmp: bool=True) -> Callable:
"""
Builds a potential or its gradient with the given expression.

Args:
    expression: numerical formula of the potential in python formatting;
    inputs: adjustable parameters of the potential;
    type: the type of the potential ('potential-2-g' for example);
    openmp: if True, makes a parallel function compiled against OpenMP;

Returns:
    A function implementing this potential.
"""
# Assemble sources, compile and import the function
Edited Jan 18, 2021 by Artem Pulkin
Assignee
Assign to
Time tracking