Module: BOAST::FORTRANRuntime

Includes:
CompiledRuntime
Defined in:
lib/BOAST/Runtime/FORTRANRuntime.rb

Instance Attribute Summary

Attributes included from CompiledRuntime

#binary, #source

Instance Method Summary collapse

Methods included from CompiledRuntime

#base_name, #base_path, #build, #cleanup, #copy_array_param_from_ruby, #copy_array_param_to_ruby, #copy_scalar_param_from_ruby, #copy_scalar_param_to_ruby, #create_library_source, #create_module_file_source, #create_procedure_call, #create_sources, #create_targets, #directory, #dump_binary, #dump_source, #fill_check_args, #fill_decl_module_params, #fill_module_file_source, #fill_module_header, #fill_module_preamble, #get_params_value, #get_results, #get_sub_kernels, #library_object, #library_path, #library_source, #load_module, #maqao_analysis, #module_file_base_name, #module_file_base_path, #module_file_object, #module_file_path, #module_file_source, #module_name, #save_binary, #save_source, #store_results, #target, #target_depends, #target_sources

Instance Method Details

#create_procedure_call_parametersObject



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/BOAST/Runtime/FORTRANRuntime.rb', line 39

def create_procedure_call_parameters
  params = []
  @procedure.parameters.each { |param|
    if param.dimension then
      params.push( param.name )
    else
      params.push( "&"+param.name )
    end
  }
  return params
end

#fill_library_sourceObject



35
36
37
# File 'lib/BOAST/Runtime/FORTRANRuntime.rb', line 35

def fill_library_source
  get_output.print line_limited_source
end

#line_limited_sourceObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/BOAST/Runtime/FORTRANRuntime.rb', line 10

def line_limited_source
  s = ""
  @code.rewind
  @code.each_line { |line|
    if line.match(/^\s*!\w*?\$/) then
      if line.match(/^\s*!\$(omp|OMP)/) then
        chunks = line.scan(/.{1,#{fortran_line_length-7}}/)
        s += chunks.join("&\n!$omp&") + "\n"
      elsif line.match(/^\s*!(DIR|dir)\$/) then
        chunks = line.scan(/.{1,#{fortran_line_length-7}}/)
        s += chunks.join("&\n!DIR$&") + "\n"
      else
        chunks = line.scan(/.{1,#{fortran_line_length-4}}/)
        s += chunks.join("&\n!$&") + "\n"
      end
    elsif line.match(/^\s*!/) then
      s += line
    else
      chunks = line.scan(/.{1,#{fortran_line_length-2}}/)
      s += chunks.join("&\n&") + "\n"
    end
  }
  return s
end

#method_nameObject



6
7
8
# File 'lib/BOAST/Runtime/FORTRANRuntime.rb', line 6

def method_name
  return @procedure.name + "_"
end