Skip to content

Commit

Permalink
fix linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfhm committed Oct 30, 2023
1 parent 85e93bf commit bf0590e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions cmake/loki_transform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include( loki_transform_helpers )
# [CPP]
# [FRONTEND <frontend>]
# [INLINE_MEMBERS]
# [FIX_SCALAR_SYNTAX]
# [FIX_SCALARS]
# [BUILDDIR <build-path>]
# [SOURCES <source1> [<source2> ...]]
# [HEADERS <header1> [<header2> ...]]
Expand All @@ -47,7 +47,7 @@ function( loki_transform )

set( options
CPP DATA_OFFLOAD REMOVE_OPENMP ASSUME_DEVICEPTR TRIM_VECTOR_SECTIONS GLOBAL_VAR_OFFLOAD
REMOVE_DERIVED_ARGS INLINE_MEMBERS FIX_SCALAR_SYNTAX DERIVE_ARGUMENT_ARRAY_SHAPE
REMOVE_DERIVED_ARGS INLINE_MEMBERS FIX_SCALARS DERIVE_ARGUMENT_ARRAY_SHAPE
)
set( oneValueArgs
COMMAND MODE DIRECTIVE FRONTEND CONFIG BUILDDIR
Expand Down Expand Up @@ -194,7 +194,7 @@ endfunction()
# [DIRECTIVE <openacc|openmp|...>]
# [SOURCES <source1> [<source2> ...]]
# [HEADERS <header1> [<header2> ...]]
# [NO_PLAN_SOURCEDIR COPY_UNMODIFIED INLINE_MEMBERS FIX_SCALAR_SYNTAX]
# [NO_PLAN_SOURCEDIR COPY_UNMODIFIED INLINE_MEMBERS FIX_SCALARS]
# )
#
# Applies a Loki bulk transformation to the source files belonging to a particular
Expand Down Expand Up @@ -223,7 +223,7 @@ endfunction()

function( loki_transform_target )

set( options NO_PLAN_SOURCEDIR COPY_UNMODIFIED CPP CPP_PLAN INLINE_MEMBERS FIX_SCALAR_SYNTAX )
set( options NO_PLAN_SOURCEDIR COPY_UNMODIFIED CPP CPP_PLAN INLINE_MEMBERS FIX_SCALARS )
set( single_value_args TARGET COMMAND MODE DIRECTIVE FRONTEND CONFIG PLAN )
set( multi_value_args SOURCES HEADERS )

Expand Down Expand Up @@ -292,8 +292,8 @@ function( loki_transform_target )
list( APPEND _TRANSFORM_OPTIONS INLINE_MEMBERS )
endif()

if( _PAR_FIX_SCALAR_SYNTAX )
list( APPEND _TRANSFORM_OPTIONS FIX_SCALAR_SYNTAX )
if( _PAR_FIX_SCALARS )
list( APPEND _TRANSFORM_OPTIONS FIX_SCALARS )
endif()

loki_transform(
Expand Down Expand Up @@ -389,7 +389,7 @@ or

set( options
CPP DATA_OFFLOAD REMOVE_OPENMP ASSUME_DEVICEPTR GLOBAL_VAR_OFFLOAD
TRIM_VECTOR_SECTIONS REMOVE_DERIVED_ARGS INLINE_MEMBERS FIX_SCALAR_SYNTAX
TRIM_VECTOR_SECTIONS REMOVE_DERIVED_ARGS INLINE_MEMBERS FIX_SCALARS
)
set( oneValueArgs
MODE DIRECTIVE FRONTEND CONFIG PATH OUTPATH
Expand Down
4 changes: 2 additions & 2 deletions cmake/loki_transform_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ macro( _loki_transform_parse_options )
list( APPEND _ARGS --inline-members )
endif()

if( _PAR_FIX_SCALAR_SYNTAX )
list( APPEND _ARGS --fix-scalar-syntax )
if( _PAR_FIX_SCALARS )
list( APPEND _ARGS --fix-scalars )
endif()

if( _PAR_DERIVE_ARGUMENT_ARRAY_SHAPE )
Expand Down
6 changes: 3 additions & 3 deletions scripts/loki_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ def cli(debug):
help="Remove derived-type arguments and replace with canonical arguments")
@click.option('--inline-members/--no-inline-members', default=False,
help='Inline member functions for SCC-class transformations.')
@click.option('--fix-scalar-syntax/--no-fix-scalar-syntax', default=False,
@click.option('--fix-scalars/--no-fix-scalars', default=False,
help='Replace array arguments passed as scalars with arrays.')
@click.option('--derive-argument-array-shape/--no-derive-argument-array-shape', default=False,
help="Recursively derive explicit shape dimension for argument arrays")
def convert(
mode, config, build, source, header, cpp, directive, include, define, omni_include, xmod,
data_offload, remove_openmp, assume_deviceptr, frontend, trim_vector_sections,
global_var_offload, remove_derived_args, inline_members, fix_scalar_syntax,
global_var_offload, remove_derived_args, inline_members, fix_scalars,
derive_argument_array_shape
):
"""
Expand Down Expand Up @@ -211,7 +211,7 @@ def convert(
# Apply the basic SCC transformation set
scheduler.process( SCCBaseTransformation(
horizontal=horizontal, directive=directive,
inline_members=inline_members, fix_scalar_syntax=fix_scalar_syntax
inline_members=inline_members, fix_scalars=fix_scalars
))
scheduler.process( SCCDevectorTransformation(
horizontal=horizontal, trim_vector_sections=trim_vector_sections
Expand Down
6 changes: 3 additions & 3 deletions transformations/transformations/single_column_coalesced.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ class methods can be called directly.
Enable full source-inlining of member subroutines; default: False.
"""

def __init__(self, horizontal, directive=None, inline_members=False, fix_scalar_syntax=False):
def __init__(self, horizontal, directive=None, inline_members=False, fix_scalars=False):
self.horizontal = horizontal

assert directive in [None, 'openacc']
self.directive = directive

self.inline_members = inline_members
self.fix_scalar_syntax = fix_scalar_syntax
self.fix_scalars = fix_scalars

@classmethod
def check_routine_pragmas(cls, routine, directive):
Expand Down Expand Up @@ -293,7 +293,7 @@ def process_kernel(self, routine):
v_index = self.get_integer_variable(routine, name=self.horizontal.index)

# Transform arrays passed with scalar syntax to array syntax
if self.fix_scalar_syntax:
if self.fix_scalars:
fix_scalar_syntax(routine)

# Perform full source-inlining for member subroutines if so requested
Expand Down

0 comments on commit bf0590e

Please sign in to comment.