Skip to content

Commit 5d66de6

Browse files
committed
Clarify docs, mark functor funcs to be depreciated
1 parent 10c217c commit 5d66de6

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

pykokkos/core/translators/members.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,12 @@ def get_fields(
115115
Get all fields (or instance variables) in classdef by parsing the constructor
116116
117117
:param classdef: the classdef being parsed
118-
:param source: the python source code of the workload
118+
:param source: the python source code of the functor
119119
:param pk_import: the identifier used to access the PyKokkos package
120120
:returns: a dictionary mapping from field name to type
121+
122+
123+
NOTE: **used by workloads & functors; depreciate with functions**
121124
"""
122125

123126
visitor = ConstructorVisitor(source, "fields", pk_import, True)
@@ -133,9 +136,11 @@ def get_views(
133136
Get all views defined in classdef by parsing the constructor
134137
135138
:param classdef: the classdef to be parsed
136-
:param source: the python source code of the workload
139+
:param source: the python source code of the functor
137140
:param pk_import: the identifier used to access the PyKokkos package
138141
:returns: a dictionary mapping from view name to type (only dimensionality and type)
142+
143+
NOTE: **used by workloads & functors; depreciate with functions**
139144
"""
140145

141146
visitor = ConstructorVisitor(source, "views", pk_import, True)
@@ -179,7 +184,7 @@ def get_params(
179184
Gets all fields and views passed as parameters to the workunit
180185
181186
:param functiondef: the functiondef to be parsed
182-
:param source: the python source code of the workload
187+
:param source: the python source code of the workunit
183188
:param param_begin: where workunit argument begins (excluding tid/acc)
184189
"""
185190

@@ -198,7 +203,7 @@ def get_view_template_params(
198203
Get the template parameters for all views defined in the constructor
199204
200205
:param node: the classdef or functiondef to be parsed
201-
:param source: the python source code of the workload
206+
:param source: the python source code of the workunit
202207
:returns: a dictionary mapping from view name to a list of template parameters
203208
"""
204209

@@ -268,9 +273,11 @@ def get_random_pool(
268273
Gets the type of the random pool if it exists
269274
270275
:param classdef: the classdef to be parsed
271-
:param source: the python source code of the workload
276+
:param source: the python source code of the functor
272277
:param pk_import: the identifier used to access the PyKokkos package
273278
:returns: the type of the random pool if it exists
279+
280+
NOTE: **used by workloads & functors; depreciate with functions**
274281
"""
275282

276283
visitor = ConstructorVisitor(source, "randpool", pk_import, True)

pykokkos/core/visitors/constructor_visitor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def __init__(
2222
:param member_type: specifies which members to retrieve, "fields", "views", or "typeinfo"
2323
:param pk_import: the identifier used to access the PyKokkos package
2424
:param debug: if true, prints the python AST when an error is encountered
25+
26+
NOTE: **used by workloads & functors; depreciate with functions**
2527
"""
2628

2729
if member_type not in ("fields", "views", "typeinfo", "randpool"):

0 commit comments

Comments
 (0)