mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
IRP_ALIGN introduced
This commit is contained in:
parent
017cbcb43f
commit
91ac0ac940
@ -43,7 +43,7 @@ options['g'] = [ 'profile' , 'Generate profile code', 0 ]
|
||||
options['t'] = [ 'touch' , 'Display which entities are touched', 1 ]
|
||||
options['m'] = [ 'memory' , 'Debug memory info', 0 ]
|
||||
options['z'] = [ 'openmp' , 'Automatic openMP tasks (may not work)', 0 ]
|
||||
options['l'] = [ 'align' , 'Align arrays using compiler directives', 1 ]
|
||||
options['l'] = [ 'align' , 'Align arrays using compiler directives. Sets the $IRP_ALIGN variable', 1 ]
|
||||
options['s'] = [ 'substitute' , 'Substitute values for loop max values', 1 ]
|
||||
options['r'] = [ 'no_directives', 'Ignore compiler directives !DEC$ and !DIR$', 0 ]
|
||||
options['n'] = [ 'inline' , 'all|providers|builders : Force inlining of providers or builders', 1 ]
|
||||
@ -106,10 +106,10 @@ class CommandLine(object):
|
||||
|
||||
def align(self):
|
||||
if '_align' not in self.__dict__:
|
||||
self._align = 0
|
||||
self._align = '1'
|
||||
for o,a in self.opts:
|
||||
if o in [ "-l", '--'+options['l'][0] ]:
|
||||
self._align = int(a)
|
||||
self._align = a
|
||||
return self._align
|
||||
align = property(fget=align)
|
||||
|
||||
|
@ -96,6 +96,7 @@ def get_type (i, filename, line, is_doc):
|
||||
assert type(is_doc) == bool
|
||||
|
||||
line = line.rstrip()
|
||||
line = line.replace("$IRP_ALIGN",command_line.align)
|
||||
lower_line0 = line.lstrip().lower()
|
||||
lower_line = lower_line0.replace("!"," ! ")
|
||||
|
||||
@ -106,6 +107,7 @@ def get_type (i, filename, line, is_doc):
|
||||
lower_line = re_endmodule.sub("endmodule",lower_line)
|
||||
lower_line = re_endif.sub("endif",lower_line)
|
||||
lower_line = re_endselect.sub("endselect",lower_line)
|
||||
|
||||
for c in """()'"[]""":
|
||||
lower_line = lower_line.replace(c," "+c+" ")
|
||||
|
||||
|
@ -233,8 +233,8 @@ class Variable(object):
|
||||
if '_header' not in self.__dict__:
|
||||
name = self.name
|
||||
self._header = [ " %s :: %s %s"%(self.type, name, build_dim_colons(self) ) ]
|
||||
if self.dim != [] and command_line.align > 0:
|
||||
self._header += [" !DIR$ ATTRIBUTES ALIGN: %d :: %s"%(command_line.align,name)]
|
||||
if self.dim != [] and command_line.align != '1':
|
||||
self._header += [" !DIR$ ATTRIBUTES ALIGN: %s :: %s"%(command_line.align,name)]
|
||||
if self.is_main:
|
||||
self._header += [ " logical :: %s_is_built = .False."%(name) ]
|
||||
return self._header
|
||||
|
Loading…
Reference in New Issue
Block a user