Skip to content

Better data structures for LoopKernel.(domains|inames) - #298

Closed
kaushikcfd wants to merge 20 commits into
mainfrom
loop_kernel_domains
Closed

Better data structures for LoopKernel.(domains|inames) #298
kaushikcfd wants to merge 20 commits into
mainfrom
loop_kernel_domains

Conversation

@kaushikcfd

Copy link
Copy Markdown
Collaborator
  • Domains: The new LoopKernelDomains class now holds on to some derived variables that are incrementally updated to avoid recomputation during every instantitation.
  • Inames: Stores inames in a sparse-sense.
  • Depends on make LoopKernel.__init__ leaner #293

@kaushikcfd
kaushikcfdforce-pushed the loop_kernel_domains branch 3 times, most recently from c0956d3 to 6bdf0f4CompareApril 17, 2021 00:29
@kaushikcfd
kaushikcfdforce-pushed the loop_kernel_domains branch from 241194f to 584109aCompareJune 2, 2021 23:52
This is done by adding attribute-specific copies so that heavy operations in
LoopKernel.__init__ are invoked only when necessary
* Provides better performance via taking into account incremental updates
* Adds :mod:`pyrsistent` as a dep.
* dict would be a dense data structure that would require lead costly LoopKernel
copies.
* pyrsistent.PClass doesn't play well with pylint
* adds pyrsistent to list of intersphinx mappings
* LoopKernelDomains.swap(..) exits early if the obtained domain is identical
- there was really no good reason why this was present in the first place
- allowing this is a GOOD idea as it allows to have more flexibility in defining
fine-grained domains
@kaushikcfd
kaushikcfdforce-pushed the loop_kernel_domains branch from 584109a to c3112ccCompareJune 3, 2021 00:34
@kaushikcfd

Copy link
Copy Markdown
CollaboratorAuthor

This PR started depending on #372 in that the current code-generation implementation starts doing wonky updates to the domain which doesn't retain certain assumptions this branch makes like each iname belongs to exactly one home domain. I'm closing this in favor of that. The downside is that #372 starts increasing in volume, but there's no good way to keep them separate.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@kaushikcfd