Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK-m VTK-m
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 206
    • Issues 206
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 35
    • Merge requests 35
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTK-mVTK-m
  • Merge requests
  • !2602

Refactor Oscillator source

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Li-Ta Lo requested to merge ollielo/vtk-m:osc_refactor into master Oct 12, 2021
  • Overview 51
  • Commits 14
  • Pipelines 21
  • Changes 16

This MR serves as a prototype for the Filter redesign #601. Modeled after the Tangle and Wavelet source, the OscillatorSource worklet now resides in the Oscillator.cxx instead of a separate header file in the worklet directory. This allows client code to not depend on device compiler.

Since the OscillatorSource worklet is stateful and the states are exposed to the client code through the public interface of Oscillator there is a circular dependency in the declaration and definition of these two. That is, in order to define Oscillator which has OscillatorSource as a data member, the compiler needs to see the definition of OscillatorSource first, defeating the effort to hide the worklet from client code. A PImpl pattern is used to resolve this dependency. Instead of an object of OscillatorSource as a data member, now Oscillator has a std::unique_ptr<OscillatorSource> as a data member. The compiler now does not need to see the definition of OscillatorSource in order to compile Oscillator thus allowing OscillatorSource to be defined in the .cxx file.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: osc_refactor