Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 7 additions & 111 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7135,14 +7135,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 14,
"endColumn": 35,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -7335,14 +7327,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 14,
"endColumn": 35,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -8115,14 +8099,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 14,
"endColumn": 35,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -8688,82 +8664,26 @@
}
},
{
"code": "reportUnknownParameterType",
"range": {
"startColumn": 29,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportMissingParameterType",
"range": {
"startColumn": 29,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportUnknownParameterType",
"range": {
"startColumn": 36,
"endColumn": 41,
"lineCount": 1
}
},
{
"code": "reportMissingParameterType",
"range": {
"startColumn": 36,
"endColumn": 41,
"lineCount": 1
}
},
{
"code": "reportUnknownParameterType",
"code": "reportAny",
"range": {
"startColumn": 43,
"endColumn": 50,
"startColumn": 12,
"endColumn": 15,
"lineCount": 1
}
},
{
"code": "reportMissingParameterType",
"code": "reportAny",
"range": {
"startColumn": 43,
"endColumn": 50,
"startColumn": 19,
"endColumn": 86,
"lineCount": 1
}
},
{
"code": "reportAny",
"range": {
"startColumn": 15,
"endColumn": 82,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 52,
"endColumn": 57,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 59,
"endColumn": 64,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
"startColumn": 74,
"endColumn": 81,
"endColumn": 20,
"lineCount": 1
}
},
Expand Down Expand Up @@ -9967,14 +9887,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 14,
"endColumn": 44,
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
Expand Down Expand Up @@ -14621,14 +14533,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 18,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand All @@ -14637,14 +14541,6 @@
"lineCount": 1
}
},
{
"code": "reportUnknownMemberType",
"range": {
"startColumn": 18,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportUnknownArgumentType",
"range": {
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,16 @@ extend-select = [
"Q", # flake8-quotes
"RUF", # ruff
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"UP", # pyupgrade
"W", # pycodestyle
"TC",
]
extend-ignore = [
"C90", # McCabe complexity
"E221", # multiple spaces before operator
"E226", # missing whitespace around arithmetic operator
"E402", # module-level import not at top of file
"C90", # McCabe complexity
"E221", # multiple spaces before operator
"E226", # missing whitespace around arithmetic operator
"E402", # module-level import not at top of file
"RUF067", # non-empty-init-module
]

[tool.ruff.lint.flake8-quotes]
Expand Down
16 changes: 12 additions & 4 deletions sumpy/fmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
from boxtree.tree import Tree

import pytools.obj_array as obj_array
from pytools import memoize_method
from pytools import memoize_in, memoize_method

from sumpy import (
E2EFromChildren,
Expand Down Expand Up @@ -240,9 +240,17 @@ def p2p(self):
exclude_self=self.exclude_self,
strength_usage=self.strength_usage, name="p2p")

@memoize_method
def opencl_fft_app(self, shape, dtype, inverse):
return get_opencl_fft_app(self._setup_actx, shape, dtype, inverse=inverse)
def opencl_fft_app(self,
shape: tuple[int, ...],
dtype: np.dtype[Any],
inverse: bool) -> Any:
@memoize_in(self._setup_actx, (
SumpyTreeIndependentDataForWrangler.opencl_fft_app,
shape, dtype, inverse))
def app() -> Any:
return get_opencl_fft_app(self._setup_actx, shape, dtype, inverse=inverse)

return app()

# }}}

Expand Down
Loading