Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we clean up plan creation with partial instantiations? #53

Open
npadmana opened this issue Oct 28, 2019 · 1 comment
Open

Can we clean up plan creation with partial instantiations? #53

npadmana opened this issue Oct 28, 2019 · 1 comment

Comments

@npadmana
Copy link
Owner

See notes from @ronawho below...

Coincidently I was thinking about how to clean up plan creation earlier today as I was learning about some new partial instantiation features in 1.20 ('partial instantiation' section of https://chapel-lang.org/releaseNotes/1.20/01-language.pdf)

With that, I was wondering if we could avoid some of the duplicate array and ft Type stuff and push the setup logic into an initializer. Something roughly like:

record FFTWplan {
  type arrType;
  param ftType: FFTtype;
  ...
  proc init(dom: domain, numTransforms: int, signOrKind, flags : c_uint = FFTW_MEASURE) {
    ...
  }
}
type Plan = FFTWplan(T, ftType);
var xPlan = new Plan({xDst, zSrc}, 1, signOrKind);
var yPlan = new Plan({ySrc, zSrc}, 1, signOrKind);
var zPlan = new Plan({zSrc},       1, signOrKind);

But anyway, I think what's here is a nice cleanup, just some misc thoughts I had earlier today.

Originally posted by @ronawho in #52 (comment)

@npadmana
Copy link
Owner Author

Also see this if we're cleaning up.

#52 (comment)

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

No branches or pull requests

1 participant