Module: BOAST

Extended by:
Functors, OpenCLHelper, TopLevelExpressions, TypeTransition, VarFunctors
Defined in:
lib/BOAST/Language/If.rb,
lib/BOAST/Language/For.rb,
lib/BOAST/Language/Case.rb,
lib/BOAST/Runtime/MAQAO.rb,
lib/BOAST/Runtime/Probe.rb,
lib/BOAST/Language/Error.rb,
lib/BOAST/Language/Index.rb,
lib/BOAST/Language/Print.rb,
lib/BOAST/Language/Slice.rb,
lib/BOAST/Language/State.rb,
lib/BOAST/Language/While.rb,
lib/BOAST/Runtime/Config.rb,
lib/BOAST/Language/Config.rb,
lib/BOAST/Language/OpenMP.rb,
lib/BOAST/Language/Parens.rb,
lib/BOAST/Language/Pragma.rb,
lib/BOAST/Runtime/CKernel.rb,
lib/BOAST/Language/Comment.rb,
lib/BOAST/Runtime/CRuntime.rb,
lib/BOAST/Language/FuncCall.rb,
lib/BOAST/Language/Functors.rb,
lib/BOAST/Language/Variable.rb,
lib/BOAST/Runtime/Compilers.rb,
lib/BOAST/Language/Algorithm.rb,
lib/BOAST/Language/CodeBlock.rb,
lib/BOAST/Language/DataTypes.rb,
lib/BOAST/Language/Operators.rb,
lib/BOAST/Language/Procedure.rb,
lib/BOAST/Runtime/FFIRuntime.rb,
lib/BOAST/Language/Annotation.rb,
lib/BOAST/Language/Arithmetic.rb,
lib/BOAST/Language/Expression.rb,
lib/BOAST/Language/Intrinsics.rb,
lib/BOAST/Runtime/CUDARuntime.rb,
lib/BOAST/Runtime/EnergyProbe.rb,
lib/BOAST/Runtime/MPPARuntime.rb,
lib/BOAST/Runtime/OpenCLTypes.rb,
lib/BOAST/Runtime/Temperature.rb,
lib/BOAST/Language/Inspectable.rb,
lib/BOAST/Language/Transitions.rb,
lib/BOAST/Language/BOAST_OpenCL.rb,
lib/BOAST/Runtime/AffinityProbe.rb,
lib/BOAST/Runtime/NonRegression.rb,
lib/BOAST/Runtime/OpenCLRuntime.rb,
lib/BOAST/Language/Architectures.rb,
lib/BOAST/Runtime/FORTRANRuntime.rb,
lib/BOAST/Runtime/CompiledRuntime.rb,
lib/BOAST/Language/ARMCPUID_by_name.rb,
lib/BOAST/Language/ControlStructure.rb,
lib/BOAST/Language/X86CPUID_by_name.rb,
lib/BOAST/Optimization/Optimization.rb,
lib/BOAST/Runtime/RubyEnergyMonitor.rb,
lib/BOAST/Language/HighLevelOperators.rb

Defined Under Namespace

Modules: AffinityProbe, Annotation, Arithmetic, CRuntime, CUDARuntime, CompiledRuntime, Compilers, EmlProbe, FFIRuntime, FORTRANRuntime, Functor, Functors, Inspectable, Intrinsics, MAQAO, MPPAProbe, MPPARuntime, OpenCLHelper, OpenCLRuntime, OpenMP, PAPIProbe, PowercapProbe, PrivateStateAccessor, RedfstProbe, Temperature, TimerProbe, TopLevelExpressions, TypeTransition, VarFunctor, VarFunctors Classes: Addition, Affectation, And, BasicBinaryOperator, BooleanParameter, BruteForceOptimizer, CKernel, CStruct, Case, CaseCondition, CodeBlock, Comment, ConstArray, ControlStructure, CustomType, DataType, Dereference, Different, Dimension, Division, Equal, Error, Exponentiation, Expression, FMA, FMS, For, FuncCall, GenericOptimization, GeneticOptimizer, Greater, GreaterOrEqual, HighLevelOperator, If, Index, Int, InternalIntrinsicsError, IntrinsicsError, LanguageError, Less, LessOrEqual, Load, Mask, MaskLoad, MaskStore, Max, Min, Minus, Modulo, Multiplication, Not, Operator, OperatorError, OptimizationParameter, OptimizationSpace, Optimizer, Or, Plus, Pragma, Procedure, Real, Reference, Set, Sizet, Slice, Sqrt, Store, Subtraction, Ternary, TrigonometricOperator, Variable, While

Constant Summary collapse

LANGUAGES =
['FORTRAN', 'C', 'CL', 'CUDA']
ARCHITECTURES =
['X86', 'ARM', 'MPPA']
FUNCCALLS =
{}
Var =
Variable
Dim =
Dimension
Call =
FuncCall
MODELS =
{ "native" => native_flags }
INSTRUCTIONS =
{}
EnergyProbe =
nil
OP =
OptimizationParameter
BP =
BooleanParameter
@@compiler_default_options =
{
  :FC => 'gfortran',
  :FCFLAGS => '-O2 -Wall',
  :CC => 'gcc',
  :CFLAGS => '-O2 -Wall',
  :CXX => 'g++',
  :CXXFLAGS => '-O2 -Wall',
  :NVCC => 'nvcc',
  :NVCCFLAGS => '-O2',
  :LDFLAGS => '',
  :CLFLAGS => '',
  :CLVENDOR => nil,
  :CLPLATFORM => nil,
  :CLDEVICE => nil,
  :CLDEVICETYPE => nil,
  :MAQAO => 'maqao',
  :MAQAO_FLAGS => '',
  :MAQAO_PATH => '',
  :MAQAO_PASS => false,
  :MAQAO_SCRIPT => '',
  :OPENMP => false,
  :probes => nil
}
@@openmp_default_flags =
{
  "gcc" => "-fopenmp",
  "icc" => "-openmp",
  "gfortran" => "-fopenmp",
  "ifort" => "-openmp",
  "g++" => "-fopenmp",
  "icpc" => "-openmp"
}
@@run_options =
[
  :PAPI
]
@@run_config =
{
}
@@boast_config =
{
  :fortran_line_length => 72
}
@@architecture =
get_default_architecture
@@output =
STDOUT
@@chain_code =
false
@@decl_module =
false
@@annotate_numbers =
Hash::new { |h,k| h[k] = 0 }
@@env =
Hash::new{|h, k| h[k] = []}

Class Method Summary collapse

Methods included from Functors

Affectation, CodeBlock, Dimension, Expression, FMA, FMS, Load, MaskLoad, MaskStore, Procedure, Set, Store, Ternary, Variable, functorize

Methods included from VarFunctors

CStruct, CustomType, Int, Real, Sizet, var_functorize

Methods included from TypeTransition

get_transition, set_transition, transition

Methods included from TopLevelExpressions

And, Max, Min, Or, Return

Methods included from OpenCLHelper

barrier, get_global_id, get_global_size, get_group_id, get_local_id, get_local_size, get_num_groups, get_work_dim

Class Method Details

.address_sizeObject

Returns the BOAST address_size state.

Returns:

  • the BOAST address_size state



86
# File 'lib/BOAST/Language/Config.rb', line 86

state_accessor :address_size

.address_size=(val) ⇒ Object

Sets address_size state to a new value

Parameters:

  • val

    the new value of address_size state

Returns:

  • the new address_size state



86
# File 'lib/BOAST/Language/Config.rb', line 86

state_accessor :address_size

.annotateObject

Returns the BOAST annotate state.

Returns:

  • the BOAST annotate state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor annotate

.annotate=(val) ⇒ Object

Sets annotate state to a new value

Parameters:

  • val

    the new value of annotate state

Returns:

  • the new annotate state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor annotate

.annotate?Object

Returns the boolean evaluation of the annotate state.

Returns:

  • the boolean evaluation of the annotate state



105
# File 'lib/BOAST/Language/Config.rb', line 105

boolean_state_accessor :annotate

.annotate_indepth_listObject

Returns the BOAST annotate_indepth_list state.

Returns:

  • the BOAST annotate_indepth_list state



95
# File 'lib/BOAST/Language/Config.rb', line 95

state_accessor :annotate_indepth_list

.annotate_indepth_list=(val) ⇒ Object

Sets annotate_indepth_list state to a new value

Parameters:

  • val

    the new value of annotate_indepth_list state

Returns:

  • the new annotate_indepth_list state



95
# File 'lib/BOAST/Language/Config.rb', line 95

state_accessor :annotate_indepth_list

.annotate_levelObject

Returns the BOAST annotate_level state.

Returns:

  • the BOAST annotate_level state



96
# File 'lib/BOAST/Language/Config.rb', line 96

state_accessor :annotate_level

.annotate_level=(val) ⇒ Object

Sets annotate_level state to a new value

Parameters:

  • val

    the new value of annotate_level state

Returns:

  • the new annotate_level state



96
# File 'lib/BOAST/Language/Config.rb', line 96

state_accessor :annotate_level

.annotate_listObject

Returns the BOAST annotate_list state.

Returns:

  • the BOAST annotate_list state



94
# File 'lib/BOAST/Language/Config.rb', line 94

state_accessor :annotate_list

.annotate_list=(val) ⇒ Object

Sets annotate_list state to a new value

Parameters:

  • val

    the new value of annotate_list state

Returns:

  • the new annotate_list state



94
# File 'lib/BOAST/Language/Config.rb', line 94

state_accessor :annotate_list

.annotate_number(name) ⇒ Object

Returns an annotation number for the given name. The number is incremented for a given name is incremented each time this name is called



134
135
136
137
138
# File 'lib/BOAST/Language/Algorithm.rb', line 134

def annotate_number(name)
  num = @@annotate_numbers[name]
  @@annotate_numbers[name] = num + 1
  return num
end

.architectureObject

Returns the BOAST architecture state.

Returns:

  • the BOAST architecture state



84
# File 'lib/BOAST/Language/Config.rb', line 84

state_accessor :architecture

.architecture=(val) ⇒ Object

Sets architecture state to a new value

Parameters:

  • val

    the new value of architecture state

Returns:

  • the new architecture state



84
# File 'lib/BOAST/Language/Config.rb', line 84

state_accessor :architecture

.array_startObject

Returns the BOAST array_start state.

Returns:

  • the BOAST array_start state



91
# File 'lib/BOAST/Language/Config.rb', line 91

state_accessor :array_start

.array_start=(val) ⇒ Object

Sets array_start state to a new value

Parameters:

  • val

    the new value of array_start state

Returns:

  • the new array_start state



91
# File 'lib/BOAST/Language/Config.rb', line 91

state_accessor :array_start

.assert_boast_config_dirObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/BOAST/Language/Config.rb', line 23

def assert_boast_config_dir
  home_config_dir = ENV["XDG_CONFIG_HOME"]
  home_config_dir = "#{Dir.home}/.config" if not home_config_dir
  Dir.mkdir( home_config_dir ) if not File::exist?( home_config_dir )
  return nil if not File::directory?(home_config_dir)
  boast_config_dir = "#{home_config_dir}/BOAST"
  Dir.mkdir( boast_config_dir ) if not File::exist?( boast_config_dir )
  return nil if not File::directory?(boast_config_dir)
  return boast_config_dir
end

.boast_inspectObject

Returns the BOAST boast_inspect state.

Returns:

  • the BOAST boast_inspect state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor boast_inspect

.boast_inspect=(val) ⇒ Object

Sets boast_inspect state to a new value

Parameters:

  • val

    the new value of boast_inspect state

Returns:

  • the new boast_inspect state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor boast_inspect

.boast_inspect?Object

Returns the boolean evaluation of the boast_inspect state.

Returns:

  • the boolean evaluation of the boast_inspect state



108
# File 'lib/BOAST/Language/Config.rb', line 108

boolean_state_accessor :boast_inspect

.boolean_state_accessor(state) ⇒ Object

Generates setters and getters for the specified boolean state

Parameters:

  • state (Symbol)


61
62
63
64
65
66
67
68
69
70
71
# File 'lib/BOAST/Language/State.rb', line 61

def self.boolean_state_accessor(state)
  state_accessor(state)
  s = <<EOF
module_function

def #{state}?
  !!@@#{state}
end
EOF
  eval s
end

.chain_codeObject

Returns the BOAST chain_code state.

Returns:

  • the BOAST chain_code state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor chain_code

.chain_code=(val) ⇒ Object

Sets chain_code state to a new value

Parameters:

  • val

    the new value of chain_code state

Returns:

  • the new chain_code state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor chain_code

.chain_code?Object

Returns the boolean evaluation of the chain_code state.

Returns:

  • the boolean evaluation of the chain_code state



101
# File 'lib/BOAST/Language/Config.rb', line 101

boolean_state_accessor :chain_code

.close(a) ⇒ Object

One of BOAST keywords: closes a BOAST ControlStructure or Procedure. Calls the close method of the given object.

Parameters:

  • a

    the BOAST object to close



191
192
193
# File 'lib/BOAST/Language/Algorithm.rb', line 191

def close(a)
  a.close
end

.debugObject

Returns the BOAST debug state.

Returns:

  • the BOAST debug state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor debug

.debug=(val) ⇒ Object

Sets debug state to a new value

Parameters:

  • val

    the new value of debug state

Returns:

  • the new debug state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor debug

.debug?Object

Returns the boolean evaluation of the debug state.

Returns:

  • the boolean evaluation of the debug state



102
# File 'lib/BOAST/Language/Config.rb', line 102

boolean_state_accessor :debug

.debug_kernel_sourceObject

Returns the BOAST debug_kernel_source state.

Returns:

  • the BOAST debug_kernel_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_kernel_source

.debug_kernel_source=(val) ⇒ Object

Sets debug_kernel_source state to a new value

Parameters:

  • val

    the new value of debug_kernel_source state

Returns:

  • the new debug_kernel_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_kernel_source

.debug_kernel_source?Object

Returns the boolean evaluation of the debug_kernel_source state.

Returns:

  • the boolean evaluation of the debug_kernel_source state



57
# File 'lib/BOAST/Runtime/Config.rb', line 57

boolean_state_accessor :debug_kernel_source

.debug_sourceObject

Returns the BOAST debug_source state.

Returns:

  • the BOAST debug_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_source

.debug_source=(val) ⇒ Object

Sets debug_source state to a new value

Parameters:

  • val

    the new value of debug_source state

Returns:

  • the new debug_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_source

.debug_source?Object

Returns the boolean evaluation of the debug_source state.

Returns:

  • the boolean evaluation of the debug_source state



56
# File 'lib/BOAST/Runtime/Config.rb', line 56

boolean_state_accessor :debug_source

.decl(*list) ⇒ Object

One of BOAST keywords: declares BOAST Variables and Procedures. Calls the decl method of each given objects.

Parameters:

  • list

    a list of parameters do declare



175
176
177
178
179
# File 'lib/BOAST/Language/Algorithm.rb', line 175

def decl(*list)
  list.each { |d|
    d.decl
  }
end

.decl_moduleObject

Returns the BOAST decl_module state.

Returns:

  • the BOAST decl_module state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor decl_module

.decl_module=(val) ⇒ Object

Sets decl_module state to a new value

Parameters:

  • val

    the new value of decl_module state

Returns:

  • the new decl_module state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor decl_module

.decl_module?Object

Returns the boolean evaluation of the decl_module state.

Returns:

  • the boolean evaluation of the decl_module state



104
# File 'lib/BOAST/Language/Config.rb', line 104

boolean_state_accessor :decl_module

.decrement_indent_level(increment = get_indent_increment) ⇒ Object

Decrements the indent level

Parameters:

  • increment (Integer) (defaults to: get_indent_increment)

    number of space to remove



123
124
125
# File 'lib/BOAST/Language/Algorithm.rb', line 123

def decrement_indent_level(increment = get_indent_increment)
  set_indent_level( get_indent_level - increment )
end

.default_alignObject

Returns the BOAST default_align state.

Returns:

  • the BOAST default_align state



90
# File 'lib/BOAST/Language/Config.rb', line 90

state_accessor :default_align

.default_align=(val) ⇒ Object

Sets default_align state to a new value

Parameters:

  • val

    the new value of default_align state

Returns:

  • the new default_align state



90
# File 'lib/BOAST/Language/Config.rb', line 90

state_accessor :default_align

.default_int_signedObject

Returns the BOAST default_int_signed state.

Returns:

  • the BOAST default_int_signed state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor default_int_signed

.default_int_signed=(val) ⇒ Object

Sets default_int_signed state to a new value

Parameters:

  • val

    the new value of default_int_signed state

Returns:

  • the new default_int_signed state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor default_int_signed

.default_int_signed?Object

Returns the boolean evaluation of the default_int_signed state.

Returns:

  • the boolean evaluation of the default_int_signed state



100
# File 'lib/BOAST/Language/Config.rb', line 100

boolean_state_accessor :default_int_signed

.default_int_sizeObject

Returns the BOAST default_int_size state.

Returns:

  • the BOAST default_int_size state



88
# File 'lib/BOAST/Language/Config.rb', line 88

state_accessor :default_int_size

.default_int_size=(val) ⇒ Object

Sets default_int_size state to a new value

Parameters:

  • val

    the new value of default_int_size state

Returns:

  • the new default_int_size state



88
# File 'lib/BOAST/Language/Config.rb', line 88

state_accessor :default_int_size

.default_real_sizeObject

Returns the BOAST default_real_size state.

Returns:

  • the BOAST default_real_size state



89
# File 'lib/BOAST/Language/Config.rb', line 89

state_accessor :default_real_size

.default_real_size=(val) ⇒ Object

Sets default_real_size state to a new value

Parameters:

  • val

    the new value of default_real_size state

Returns:

  • the new default_real_size state



89
# File 'lib/BOAST/Language/Config.rb', line 89

state_accessor :default_real_size

.default_state_getter(state, default, get_env_string = nil, env = state.upcase) ⇒ Object

Generates an initializer for the specified state using default value or environment variable. Calls this initializer.

Parameters:

  • state (Symbol)
  • default (Object)

    default value

  • get_env_string (String) (defaults to: nil)

    if specified, an escaped string that can be evaluated. the envs variable can be used in the string to obtain what the corresponding environment variable was. Example: ‘“const_get(#{ envs })”’

  • env (Symbol) (defaults to: state.upcase)

    name of the corresponding environment variable



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/BOAST/Language/State.rb', line 83

def self.default_state_getter(state, default, get_env_string=nil, env = state.upcase)
  envs = "ENV['#{env}']"
  s = <<EOF
module_function

def get_default_#{state}
  #{state} = @@boast_config[#{state.inspect}]
  #{state} = #{default.inspect} unless #{state}
  #{state} = #{get_env_string ? eval( "#{get_env_string}" ) : "YAML::load(#{envs})" } if #{envs}
  return #{state}
end

@@#{state} = get_default_#{state}
EOF
  eval s
end

.default_typeObject

Returns the BOAST default_type state.

Returns:

  • the BOAST default_type state



87
# File 'lib/BOAST/Language/Config.rb', line 87

state_accessor :default_type

.default_type=(val) ⇒ Object

Sets default_type state to a new value

Parameters:

  • val

    the new value of default_type state

Returns:

  • the new default_type state



87
# File 'lib/BOAST/Language/Config.rb', line 87

state_accessor :default_type

.disable_openmpObject

Returns the BOAST disable_openmp state.

Returns:

  • the BOAST disable_openmp state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor disable_openmp

.disable_openmp=(val) ⇒ Object

Sets disable_openmp state to a new value

Parameters:

  • val

    the new value of disable_openmp state

Returns:

  • the new disable_openmp state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor disable_openmp

.disable_openmp?Object

Returns the boolean evaluation of the disable_openmp state.

Returns:

  • the boolean evaluation of the disable_openmp state



107
# File 'lib/BOAST/Language/Config.rb', line 107

boolean_state_accessor :disable_openmp

.executableObject

Returns the BOAST executable state.

Returns:

  • the BOAST executable state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor executable

.executable=(val) ⇒ Object

Sets executable state to a new value

Parameters:

  • val

    the new value of executable state

Returns:

  • the new executable state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor executable

.executable?Object

Returns the boolean evaluation of the executable state.

Returns:

  • the boolean evaluation of the executable state



59
# File 'lib/BOAST/Runtime/Config.rb', line 59

boolean_state_accessor :executable

.ffiObject

Returns the BOAST ffi state.

Returns:

  • the BOAST ffi state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor ffi

.ffi=(val) ⇒ Object

Sets ffi state to a new value

Parameters:

  • val

    the new value of ffi state

Returns:

  • the new ffi state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor ffi

.ffi?Object

Returns the boolean evaluation of the ffi state.

Returns:

  • the boolean evaluation of the ffi state



58
# File 'lib/BOAST/Runtime/Config.rb', line 58

boolean_state_accessor :ffi

.fortran_line_lengthObject

Returns the BOAST fortran_line_length state.

Returns:

  • the BOAST fortran_line_length state



61
# File 'lib/BOAST/Runtime/Config.rb', line 61

state_accessor         :fortran_line_length

.fortran_line_length=(val) ⇒ Object

Sets fortran_line_length state to a new value

Parameters:

  • val

    the new value of fortran_line_length state

Returns:

  • the new fortran_line_length state



61
# File 'lib/BOAST/Runtime/Config.rb', line 61

state_accessor         :fortran_line_length

.generic_trigonometric_operator_generator(name) ⇒ Object



138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/BOAST/Language/HighLevelOperators.rb', line 138

def self.generic_trigonometric_operator_generator( name )
  eval <<EOF
class #{name.capitalize} < TrigonometricOperator
  extend Functor

  def get_intrinsic_symbol
    return :#{name.upcase}
  end

  def get_name
    return { C => "#{name}", CUDA => "#{name}", CL => "#{name}", FORTRAN => "#{name}" }
  end

end

EOF
end

.get_address_sizeObject

Returns the address_size state.

Returns:

  • the address_size state



86
# File 'lib/BOAST/Language/Config.rb', line 86

state_accessor :address_size

.get_annotateObject

Returns the annotate state.

Returns:

  • the annotate state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor annotate

.get_annotate_indepth_listObject

Returns the annotate_indepth_list state.

Returns:

  • the annotate_indepth_list state



95
# File 'lib/BOAST/Language/Config.rb', line 95

state_accessor :annotate_indepth_list

.get_annotate_levelObject

Returns the annotate_level state.

Returns:

  • the annotate_level state



96
# File 'lib/BOAST/Language/Config.rb', line 96

state_accessor :annotate_level

.get_annotate_listObject

Returns the annotate_list state.

Returns:

  • the annotate_list state



94
# File 'lib/BOAST/Language/Config.rb', line 94

state_accessor :annotate_list

.get_architectureObject

Returns the architecture state.

Returns:

  • the architecture state



84
# File 'lib/BOAST/Language/Config.rb', line 84

state_accessor :architecture

.get_architecture_nameObject

Returns the symbol corresponding to the active architecture



60
61
62
# File 'lib/BOAST/Language/Algorithm.rb', line 60

def get_architecture_name
  return ARCHITECTURES[architecture]
end

.get_array_startObject

Returns the array_start state.

Returns:

  • the array_start state



91
# File 'lib/BOAST/Language/Config.rb', line 91

state_accessor :array_start

.get_boast_inspectObject

Returns the boast_inspect state.

Returns:

  • the boast_inspect state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor boast_inspect

.get_chain_codeObject

Returns the chain_code state.

Returns:

  • the chain_code state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor chain_code

.get_compiler_optionsObject



107
108
109
# File 'lib/BOAST/Runtime/Config.rb', line 107

def get_compiler_options
  return @@compiler_default_options.clone
end

.get_debugObject

Returns the debug state.

Returns:

  • the debug state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor debug

.get_debug_kernel_sourceObject

Returns the debug_kernel_source state.

Returns:

  • the debug_kernel_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_kernel_source

.get_debug_sourceObject

Returns the debug_source state.

Returns:

  • the debug_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_source

.get_decl_moduleObject

Returns the decl_module state.

Returns:

  • the decl_module state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor decl_module

.get_default_address_sizeObject



111
# File 'lib/BOAST/Language/Config.rb', line 111

default_state_getter :address_size,          OS.bits/8

.get_default_alignObject

Returns the default_align state.

Returns:

  • the default_align state



90
# File 'lib/BOAST/Language/Config.rb', line 90

state_accessor :default_align

.get_default_annotateObject



124
# File 'lib/BOAST/Language/Config.rb', line 124

default_state_getter :annotate,              false

.get_default_annotate_indepth_listObject



126
# File 'lib/BOAST/Language/Config.rb', line 126

default_state_getter :annotate_indepth_list, ["For"], '"#{envs}.split(\",\").collect { |arg| YAML::load(arg) }"'

.get_default_annotate_levelObject



127
# File 'lib/BOAST/Language/Config.rb', line 127

default_state_getter :annotate_level,        0

.get_default_annotate_listObject



125
# File 'lib/BOAST/Language/Config.rb', line 125

default_state_getter :annotate_list,         ["For"], '"#{envs}.split(\",\").collect { |arg| YAML::load(arg) }"'

.get_default_architectureObject



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/BOAST/Language/Config.rb', line 162

def get_default_architecture
  architecture = nil
  begin
    env = nil
    if ENV["ARCHITECTURE"] then
      env = ENV["ARCHITECTURE"]
    elsif ENV["ARCH"] then
      env = ENV["ARCH"]
    end
    raise "Error" if env and not ARCHITECTURES.include?(env)
    architecture = const_get(env) if env
  rescue
    raise "'#{env}' is not a valid value for ARCH or ARCHITECTURE!"
  end
  return architecture if architecture
  return ARM if YAML::load( OS.report )["host_cpu"].match(/arm|aarch64/)
  return X86
end

.get_default_array_startObject



123
# File 'lib/BOAST/Language/Config.rb', line 123

default_state_getter :array_start,           1

.get_default_boast_inspectObject



131
# File 'lib/BOAST/Language/Config.rb', line 131

default_state_getter :boast_inspect, false, nil, :INSPECT

.get_default_debugObject



114
# File 'lib/BOAST/Language/Config.rb', line 114

default_state_getter :debug,                 false

.get_default_debug_kernel_sourceObject



64
# File 'lib/BOAST/Runtime/Config.rb', line 64

default_state_getter :debug_kernel_source, false

.get_default_debug_sourceObject



63
# File 'lib/BOAST/Runtime/Config.rb', line 63

default_state_getter :debug_source,        false

.get_default_default_alignObject



120
# File 'lib/BOAST/Language/Config.rb', line 120

default_state_getter :default_align,         1

.get_default_default_int_signedObject



117
# File 'lib/BOAST/Language/Config.rb', line 117

default_state_getter :default_int_signed,    true

.get_default_default_int_sizeObject



118
# File 'lib/BOAST/Language/Config.rb', line 118

default_state_getter :default_int_size,      4

.get_default_default_real_sizeObject



119
# File 'lib/BOAST/Language/Config.rb', line 119

default_state_getter :default_real_size,     8

.get_default_default_typeObject



266
# File 'lib/BOAST/Language/DataTypes.rb', line 266

default_state_getter :default_type,          Int, '"const_get(#{envs})"'

.get_default_disable_openmpObject



130
# File 'lib/BOAST/Language/Config.rb', line 130

default_state_getter :disable_openmp,        false

.get_default_executableObject



66
# File 'lib/BOAST/Runtime/Config.rb', line 66

default_state_getter :executable,          false

.get_default_ffiObject



65
# File 'lib/BOAST/Runtime/Config.rb', line 65

default_state_getter :ffi,                 false

.get_default_fortran_line_lengthObject



68
# File 'lib/BOAST/Runtime/Config.rb', line 68

default_state_getter :fortran_line_length, 72

.get_default_indent_incrementObject



122
# File 'lib/BOAST/Language/Config.rb', line 122

default_state_getter :indent_increment,      2

.get_default_indent_levelObject



121
# File 'lib/BOAST/Language/Config.rb', line 121

default_state_getter :indent_level,          0

.get_default_int_signedObject

Returns the default_int_signed state.

Returns:

  • the default_int_signed state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor default_int_signed

.get_default_int_sizeObject

Returns the default_int_size state.

Returns:

  • the default_int_size state



88
# File 'lib/BOAST/Language/Config.rb', line 88

state_accessor :default_int_size

.get_default_keep_tempObject



67
# File 'lib/BOAST/Runtime/Config.rb', line 67

default_state_getter :keep_temp,           false

.get_default_langObject



112
# File 'lib/BOAST/Language/Config.rb', line 112

default_state_getter :lang,                  FORTRAN, '"const_get(#{envs})"', :BOAST_LANG

.get_default_modelObject



113
# File 'lib/BOAST/Language/Config.rb', line 113

default_state_getter :model,                 "native"

.get_default_optimizer_logObject



128
# File 'lib/BOAST/Language/Config.rb', line 128

default_state_getter :optimizer_log,         false

.get_default_optimizer_log_fileObject



129
# File 'lib/BOAST/Language/Config.rb', line 129

default_state_getter :optimizer_log_file,    nil

.get_default_real_sizeObject

Returns the default_real_size state.

Returns:

  • the default_real_size state



89
# File 'lib/BOAST/Language/Config.rb', line 89

state_accessor :default_real_size

.get_default_replace_constantsObject



116
# File 'lib/BOAST/Language/Config.rb', line 116

default_state_getter :replace_constants,     true

.get_default_typeObject

Returns the default_type state.

Returns:

  • the default_type state



87
# File 'lib/BOAST/Language/Config.rb', line 87

state_accessor :default_type

.get_default_use_vlaObject



115
# File 'lib/BOAST/Language/Config.rb', line 115

default_state_getter :use_vla,               false

.get_default_verboseObject



62
# File 'lib/BOAST/Runtime/Config.rb', line 62

default_state_getter :verbose,             false

.get_disable_openmpObject

Returns the disable_openmp state.

Returns:

  • the disable_openmp state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor disable_openmp

.get_executableObject

Returns the executable state.

Returns:

  • the executable state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor executable

.get_ffiObject

Returns the ffi state.

Returns:

  • the ffi state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor ffi

.get_fortran_line_lengthObject

Returns the fortran_line_length state.

Returns:

  • the fortran_line_length state



61
# File 'lib/BOAST/Runtime/Config.rb', line 61

state_accessor         :fortran_line_length

.get_indent_incrementObject

Returns the indent_increment state.

Returns:

  • the indent_increment state



93
# File 'lib/BOAST/Language/Config.rb', line 93

state_accessor :indent_increment

.get_indent_levelObject

Returns the indent_level state.

Returns:

  • the indent_level state



92
# File 'lib/BOAST/Language/Config.rb', line 92

state_accessor :indent_level

.get_keep_tempObject

Returns the keep_temp state.

Returns:

  • the keep_temp state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor keep_temp

.get_langObject

Returns the lang state.

Returns:

  • the lang state



83
# File 'lib/BOAST/Language/Config.rb', line 83

state_accessor :lang

.get_lang_nameObject

Returns the symbol corresponding to the active language



65
66
67
# File 'lib/BOAST/Language/Algorithm.rb', line 65

def get_lang_name
  return LANGUAGES[lang]
end

.get_modelObject

Returns the model state.

Returns:

  • the model state



85
# File 'lib/BOAST/Language/Config.rb', line 85

state_accessor :model

.get_openmp_flagsObject



103
104
105
# File 'lib/BOAST/Runtime/Config.rb', line 103

def get_openmp_flags
  return @@openmp_default_flags.clone
end

.get_optimizer_logObject

Returns the optimizer_log state.

Returns:

  • the optimizer_log state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor optimizer_log

.get_optimizer_log_fileObject

Returns the optimizer_log_file state.

Returns:

  • the optimizer_log_file state



97
# File 'lib/BOAST/Language/Config.rb', line 97

state_accessor :optimizer_log_file

.get_outputObject

Returns the output state.

Returns:

  • the output state



82
# File 'lib/BOAST/Language/Config.rb', line 82

state_accessor :output

.get_replace_constantsObject

Returns the replace_constants state.

Returns:

  • the replace_constants state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor replace_constants

.get_run_configObject



130
131
132
# File 'lib/BOAST/Runtime/Config.rb', line 130

def get_run_config
  return @@run_config.clone
end

.get_use_vlaObject

Returns the use_vla state.

Returns:

  • the use_vla state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor use_vla

.get_verboseObject

Returns the verbose state.

Returns:

  • the verbose state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor verbose

.included(base) ⇒ Object



6
7
8
9
10
# File 'lib/BOAST/Language/State.rb', line 6

def self.included(base)
  EXTENDED.each { |m|
    base.send(:include, m)
  }
end

.increment_indent_level(increment = get_indent_increment) ⇒ Object

Increments the indent level

Parameters:

  • increment (Integer) (defaults to: get_indent_increment)

    number of space to add



117
118
119
# File 'lib/BOAST/Language/Algorithm.rb', line 117

def increment_indent_level(increment = get_indent_increment)
  set_indent_level( get_indent_level + increment )
end

.indentObject

Returns a string with as many space as the indent level.



128
129
130
# File 'lib/BOAST/Language/Algorithm.rb', line 128

def indent
   return " "*get_indent_level
end

.indent_incrementObject

Returns the BOAST indent_increment state.

Returns:

  • the BOAST indent_increment state



93
# File 'lib/BOAST/Language/Config.rb', line 93

state_accessor :indent_increment

.indent_increment=(val) ⇒ Object

Sets indent_increment state to a new value

Parameters:

  • val

    the new value of indent_increment state

Returns:

  • the new indent_increment state



93
# File 'lib/BOAST/Language/Config.rb', line 93

state_accessor :indent_increment

.indent_levelObject

Returns the BOAST indent_level state.

Returns:

  • the BOAST indent_level state



92
# File 'lib/BOAST/Language/Config.rb', line 92

state_accessor :indent_level

.indent_level=(val) ⇒ Object

Sets indent_level state to a new value

Parameters:

  • val

    the new value of indent_level state

Returns:

  • the new indent_level state



92
# File 'lib/BOAST/Language/Config.rb', line 92

state_accessor :indent_level

.keep_tempObject

Returns the BOAST keep_temp state.

Returns:

  • the BOAST keep_temp state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor keep_temp

.keep_temp=(val) ⇒ Object

Sets keep_temp state to a new value

Parameters:

  • val

    the new value of keep_temp state

Returns:

  • the new keep_temp state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor keep_temp

.keep_temp?Object

Returns the boolean evaluation of the keep_temp state.

Returns:

  • the boolean evaluation of the keep_temp state



60
# File 'lib/BOAST/Runtime/Config.rb', line 60

boolean_state_accessor :keep_temp

.langObject

Returns the BOAST lang state.

Returns:

  • the BOAST lang state



83
# File 'lib/BOAST/Language/Config.rb', line 83

state_accessor :lang

.lang=(val) ⇒ Object

Sets lang state to a new value

Parameters:

  • val

    the new value of lang state

Returns:

  • the new lang state



83
# File 'lib/BOAST/Language/Config.rb', line 83

state_accessor :lang

.modelObject

Returns the BOAST model state.

Returns:

  • the BOAST model state



85
# File 'lib/BOAST/Language/Config.rb', line 85

state_accessor :model

.model=(val) ⇒ Object

Sets model state to a new value

Parameters:

  • val

    the new value of model state

Returns:

  • the new model state



85
# File 'lib/BOAST/Language/Config.rb', line 85

state_accessor :model

.model_old=Object

Sets model state to a new value

Parameters:

  • val

    the new value of model state

Returns:

  • the new model state



138
# File 'lib/BOAST/Language/Config.rb', line 138

state_accessor :model

.open(a) ⇒ Object

Deprecated.


10
11
12
# File 'lib/BOAST/Language/Print.rb', line 10

def self.open(a)
  opn(a)
end

.opn(a) ⇒ Object

One of BOAST keywords: opens a BOAST ControlStructure or Procedure. Calls the open method of the given object.

Parameters:

  • a

    the BOAST object to open



184
185
186
# File 'lib/BOAST/Language/Algorithm.rb', line 184

def opn(a)
  a.open
end

.optimizer_logObject

Returns the BOAST optimizer_log state.

Returns:

  • the BOAST optimizer_log state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor optimizer_log

.optimizer_log=(val) ⇒ Object

Sets optimizer_log state to a new value

Parameters:

  • val

    the new value of optimizer_log state

Returns:

  • the new optimizer_log state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor optimizer_log

.optimizer_log?Object

Returns the boolean evaluation of the optimizer_log state.

Returns:

  • the boolean evaluation of the optimizer_log state



106
# File 'lib/BOAST/Language/Config.rb', line 106

boolean_state_accessor :optimizer_log

.optimizer_log_fileObject

Returns the BOAST optimizer_log_file state.

Returns:

  • the BOAST optimizer_log_file state



97
# File 'lib/BOAST/Language/Config.rb', line 97

state_accessor :optimizer_log_file

.optimizer_log_file=(val) ⇒ Object

Sets optimizer_log_file state to a new value

Parameters:

  • val

    the new value of optimizer_log_file state

Returns:

  • the new optimizer_log_file state



97
# File 'lib/BOAST/Language/Config.rb', line 97

state_accessor :optimizer_log_file

.outputObject

Returns the BOAST output state.

Returns:

  • the BOAST output state



82
# File 'lib/BOAST/Language/Config.rb', line 82

state_accessor :output

.output=(val) ⇒ Object

Sets output state to a new value

Parameters:

  • val

    the new value of output state

Returns:

  • the new output state



82
# File 'lib/BOAST/Language/Config.rb', line 82

state_accessor :output

.pop_env(*vars) ⇒ Object

Pops the specified states values

Parameters:

  • vars

    a list of state symbols



106
107
108
109
110
111
112
113
# File 'lib/BOAST/Language/Algorithm.rb', line 106

def pop_env(*vars)
  vars.each { |key|
    raise "Unknown module variable #{key}!" unless @@env.has_key?(key)
    ret = @@env[key].pop
    raise "No stored value for #{key}!" if ret.nil?
    BOAST::send("set_#{key}", ret)
  }
end

.pr(a, *args, &block) ⇒ Object

One of BOAST keywords: prints BOAST objects. Annotates the given object. Calls the given object pr method with the optional arguments.

Parameters:

  • a

    a BOAST Expression, ControlStructure or Procedure

  • args

    an optional list of parameters



167
168
169
170
# File 'lib/BOAST/Language/Algorithm.rb', line 167

def pr(a, *args, &block)
  pr_annotate(a) if annotate?
  a.pr(*args, &block)
end

.pr_annotate(a) ⇒ Object

Annotates an Object by inlining a YAML structure in a comment. If object’s class is part of the annotate list an indepth version of the annotation will be generated.

Parameters:

  • a (Object)

    object to annotate



149
150
151
152
153
154
155
156
157
158
159
# File 'lib/BOAST/Language/Algorithm.rb', line 149

def pr_annotate(a)
  name = a.class.name.gsub("BOAST::","")
  if annotate_list.include?(name) then
    description = nil
    if a.is_a?(Annotation) and a.annotate_indepth?(0) then
      description = a.annotation(0)
    end
    annotation = { "#{name}#{annotate_number(name)}" => description }
    Comment(YAML::dump(annotation)).pr
  end
end
Deprecated.


5
6
7
# File 'lib/BOAST/Language/Print.rb', line 5

def self.print(a, *args)
  pr(a, *args)
end

.push_env(vars) ⇒ Object .push_env(vars, &block) ⇒ Object

Updates states and stores their value in a stack for later retrieval

Parameters:

  • vars (Hash)

    contains state symbols and values pairs

Yields:

  • states will be popped after the given block is called



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/BOAST/Language/Algorithm.rb', line 81

def push_env(vars, &block)
  keys = []
  vars.each { |key, value|
    var = nil
    begin
      var = BOAST::send("get_#{key}")
    rescue
      BOAST::pop_env(*keys)
      raise "Unknown module variable #{key}!"
    end
    @@env[key].push(var)
    BOAST::send("set_#{key}", value)
    keys.push(key)
  }
  if block then
    begin
      block.call
    ensure
      BOAST::pop_env(*vars.keys)
    end
  end
end

.read_boast_compiler_configObject



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/BOAST/Runtime/Config.rb', line 72

def read_boast_compiler_config
  boast_config_dir = assert_boast_config_dir
  return unless boast_config_dir
  compiler_options_file = "#{boast_config_dir}/compiler_options"
  if File::exist?( compiler_options_file ) then
    File::open( compiler_options_file, "r" ) { |f|
      @@compiler_default_options.update( YAML::load( f.read ) )
    }
  else
    File::open( compiler_options_file, "w" ) { |f|
      f.write YAML::dump( @@compiler_default_options )
    }
  end
  openmp_flags_file = "#{boast_config_dir}/openmp_flags"
  if File::exist?( openmp_flags_file ) then
    File::open( openmp_flags_file, "r" ) { |f|
      @@openmp_default_flags.update( YAML::load( f.read ) )
    }
  else
    File::open( openmp_flags_file, "w" ) { |f|
      f.write YAML::dump( @@openmp_default_flags )
    }
  end
  @@compiler_default_options.each_key { |k|
    @@compiler_default_options[k] = ENV[k.to_s] if ENV[k.to_s]
  }
  @@compiler_default_options[:LD] = ENV["LD"] if ENV["LD"]
end

.read_boast_configObject



34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/BOAST/Language/Config.rb', line 34

def read_boast_config
  boast_config_dir = assert_boast_config_dir
  return unless boast_config_dir
  boast_config_file = "#{boast_config_dir}/config"
  if File::exist?( boast_config_file ) then
    File::open( boast_config_file, "r" ) { |f|
      @@boast_config.update( YAML::load( f.read ) )
    }
  else
    File::open( boast_config_file, "w" ) { |f|
      f.write YAML::dump( @@boast_config )
    }
  end
end

.read_boast_run_configObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/BOAST/Runtime/Config.rb', line 111

def read_boast_run_config
  boast_config_dir = assert_boast_config_dir
  run_config_file = "#{boast_config_dir}/run_config"
  if File::exist?( run_config_file ) then
    File::open( run_config_file, "r" ) { |f|
      @@run_config.update( YAML::load( f.read ) )
    }
  else
    File::open( run_config_file, "w" ) { |f|
      f.write YAML::dump( @@run_config )
    }
  end
  @@run_options.each { |o|
    @@run_config[o] = YAML::load(ENV[o.to_s]) if ENV[o.to_s]
  }
end

.register_funccall(name, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/BOAST/Language/Parens.rb', line 7

def register_funccall(name, options = {})
  sym = name.to_sym
  ret = options[:return] ? options[:return] : options[:returns]
  FUNCCALLS[sym] = {}
  FUNCCALLS[sym][:parameters] = options[:parameters]
  FUNCCALLS[sym][:return] = ret
  s =<<EOF
  def self.#{name}(*args)
    return FuncCall(#{sym.inspect}, *args#{ ret ? ", return: FUNCCALLS[#{sym.inspect}][:return]" : ""})
  end
EOF
  eval s
end

.replace_constantsObject

Returns the BOAST replace_constants state.

Returns:

  • the BOAST replace_constants state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor replace_constants

.replace_constants=(val) ⇒ Object

Sets replace_constants state to a new value

Parameters:

  • val

    the new value of replace_constants state

Returns:

  • the new replace_constants state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor replace_constants

.replace_constants?Object

Returns the boolean evaluation of the replace_constants state.

Returns:

  • the boolean evaluation of the replace_constants state



99
# File 'lib/BOAST/Language/Config.rb', line 99

boolean_state_accessor :replace_constants

.reset_annotate_numbersObject

Resets the annotate_numbers to an empty Hash



141
142
143
# File 'lib/BOAST/Language/Algorithm.rb', line 141

def reset_annotate_numbers
  @@annotate_numbers = Hash::new { |h,k| h[k] = 0 }
end

.set_address_size(val) ⇒ Object

Sets address_size state to a new value

Parameters:

  • val

    the new value of address_size state

Returns:

  • the new address_size state



86
# File 'lib/BOAST/Language/Config.rb', line 86

state_accessor :address_size

.set_annotate(val) ⇒ Object

Sets annotate state to a new value

Parameters:

  • val

    the new value of annotate state

Returns:

  • the new annotate state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor annotate

.set_annotate_indepth_list(val) ⇒ Object

Sets annotate_indepth_list state to a new value

Parameters:

  • val

    the new value of annotate_indepth_list state

Returns:

  • the new annotate_indepth_list state



95
# File 'lib/BOAST/Language/Config.rb', line 95

state_accessor :annotate_indepth_list

.set_annotate_level(val) ⇒ Object

Sets annotate_level state to a new value

Parameters:

  • val

    the new value of annotate_level state

Returns:

  • the new annotate_level state



96
# File 'lib/BOAST/Language/Config.rb', line 96

state_accessor :annotate_level

.set_annotate_list(val) ⇒ Object

Sets annotate_list state to a new value

Parameters:

  • val

    the new value of annotate_list state

Returns:

  • the new annotate_list state



94
# File 'lib/BOAST/Language/Config.rb', line 94

state_accessor :annotate_list

.set_architecture(val) ⇒ Object

Sets architecture state to a new value

Parameters:

  • val

    the new value of architecture state

Returns:

  • the new architecture state



84
# File 'lib/BOAST/Language/Config.rb', line 84

state_accessor :architecture

.set_array_start(val) ⇒ Object

Sets array_start state to a new value

Parameters:

  • val

    the new value of array_start state

Returns:

  • the new array_start state



91
# File 'lib/BOAST/Language/Config.rb', line 91

state_accessor :array_start

.set_boast_inspect(val) ⇒ Object

Sets boast_inspect state to a new value

Parameters:

  • val

    the new value of boast_inspect state

Returns:

  • the new boast_inspect state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor boast_inspect

.set_chain_code(val) ⇒ Object

Sets chain_code state to a new value

Parameters:

  • val

    the new value of chain_code state

Returns:

  • the new chain_code state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor chain_code

.set_debug(val) ⇒ Object

Sets debug state to a new value

Parameters:

  • val

    the new value of debug state

Returns:

  • the new debug state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor debug

.set_debug_kernel_source(val) ⇒ Object

Sets debug_kernel_source state to a new value

Parameters:

  • val

    the new value of debug_kernel_source state

Returns:

  • the new debug_kernel_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_kernel_source

.set_debug_source(val) ⇒ Object

Sets debug_source state to a new value

Parameters:

  • val

    the new value of debug_source state

Returns:

  • the new debug_source state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor debug_source

.set_decl_module(val) ⇒ Object

Sets decl_module state to a new value

Parameters:

  • val

    the new value of decl_module state

Returns:

  • the new decl_module state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor decl_module

.set_default_align(val) ⇒ Object

Sets default_align state to a new value

Parameters:

  • val

    the new value of default_align state

Returns:

  • the new default_align state



90
# File 'lib/BOAST/Language/Config.rb', line 90

state_accessor :default_align

.set_default_int_signed(val) ⇒ Object

Sets default_int_signed state to a new value

Parameters:

  • val

    the new value of default_int_signed state

Returns:

  • the new default_int_signed state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor default_int_signed

.set_default_int_size(val) ⇒ Object

Sets default_int_size state to a new value

Parameters:

  • val

    the new value of default_int_size state

Returns:

  • the new default_int_size state



88
# File 'lib/BOAST/Language/Config.rb', line 88

state_accessor :default_int_size

.set_default_real_size(val) ⇒ Object

Sets default_real_size state to a new value

Parameters:

  • val

    the new value of default_real_size state

Returns:

  • the new default_real_size state



89
# File 'lib/BOAST/Language/Config.rb', line 89

state_accessor :default_real_size

.set_default_type(val) ⇒ Object

Sets default_type state to a new value

Parameters:

  • val

    the new value of default_type state

Returns:

  • the new default_type state



87
# File 'lib/BOAST/Language/Config.rb', line 87

state_accessor :default_type

.set_disable_openmp(val) ⇒ Object

Sets disable_openmp state to a new value

Parameters:

  • val

    the new value of disable_openmp state

Returns:

  • the new disable_openmp state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor disable_openmp

.set_executable(val) ⇒ Object

Sets executable state to a new value

Parameters:

  • val

    the new value of executable state

Returns:

  • the new executable state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor executable

.set_ffi(val) ⇒ Object

Sets ffi state to a new value

Parameters:

  • val

    the new value of ffi state

Returns:

  • the new ffi state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor ffi

.set_fortran_line_length(val) ⇒ Object

Sets fortran_line_length state to a new value

Parameters:

  • val

    the new value of fortran_line_length state

Returns:

  • the new fortran_line_length state



61
# File 'lib/BOAST/Runtime/Config.rb', line 61

state_accessor         :fortran_line_length

.set_indent_increment(val) ⇒ Object

Sets indent_increment state to a new value

Parameters:

  • val

    the new value of indent_increment state

Returns:

  • the new indent_increment state



93
# File 'lib/BOAST/Language/Config.rb', line 93

state_accessor :indent_increment

.set_indent_level(val) ⇒ Object

Sets indent_level state to a new value

Parameters:

  • val

    the new value of indent_level state

Returns:

  • the new indent_level state



92
# File 'lib/BOAST/Language/Config.rb', line 92

state_accessor :indent_level

.set_keep_temp(val) ⇒ Object

Sets keep_temp state to a new value

Parameters:

  • val

    the new value of keep_temp state

Returns:

  • the new keep_temp state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor keep_temp

.set_lang(val) ⇒ Object

Sets lang state to a new value

Parameters:

  • val

    the new value of lang state

Returns:

  • the new lang state



83
# File 'lib/BOAST/Language/Config.rb', line 83

state_accessor :lang

.set_model(val) ⇒ Object

Sets model state to a new value

Parameters:

  • val

    the new value of model state

Returns:

  • the new model state



85
# File 'lib/BOAST/Language/Config.rb', line 85

state_accessor :model

.set_model_oldObject

Sets model state to a new value

Parameters:

  • val

    the new value of model state

Returns:

  • the new model state



136
# File 'lib/BOAST/Language/Config.rb', line 136

state_accessor :model

.set_optimizer_log(val) ⇒ Object

Sets optimizer_log state to a new value

Parameters:

  • val

    the new value of optimizer_log state

Returns:

  • the new optimizer_log state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor optimizer_log

.set_optimizer_log_file(val) ⇒ Object

Sets optimizer_log_file state to a new value

Parameters:

  • val

    the new value of optimizer_log_file state

Returns:

  • the new optimizer_log_file state



97
# File 'lib/BOAST/Language/Config.rb', line 97

state_accessor :optimizer_log_file

.set_output(val) ⇒ Object

Sets output state to a new value

Parameters:

  • val

    the new value of output state

Returns:

  • the new output state



82
# File 'lib/BOAST/Language/Config.rb', line 82

state_accessor :output

.set_replace_constants(val) ⇒ Object

Sets replace_constants state to a new value

Parameters:

  • val

    the new value of replace_constants state

Returns:

  • the new replace_constants state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor replace_constants

.set_use_vla(val) ⇒ Object

Sets use_vla state to a new value

Parameters:

  • val

    the new value of use_vla state

Returns:

  • the new use_vla state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor use_vla

.set_verbose(val) ⇒ Object

Sets verbose state to a new value

Parameters:

  • val

    the new value of verbose state

Returns:

  • the new verbose state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor verbose

.state_accessor(state) ⇒ Object

Generates setters and getters for the specified state

Parameters:

  • state (Symbol)


31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/BOAST/Language/State.rb', line 31

def self.state_accessor(state)
  s = <<EOF
module_function

def #{state}=(val)
  @@#{state} = val
end

def #{state}
  @@#{state}
end

def set_#{state}(val)
  @@#{state} = val
end

def get_#{state}
  @@#{state}
end
EOF
  eval s
end

.use_vlaObject

Returns the BOAST use_vla state.

Returns:

  • the BOAST use_vla state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor use_vla

.use_vla=(val) ⇒ Object

Sets use_vla state to a new value

Parameters:

  • val

    the new value of use_vla state

Returns:

  • the new use_vla state



1
# File 'lib/BOAST/Language/Config.rb', line 1

state_accessor use_vla

.use_vla?Boolean

Returns the boolean evaluation of the use_vla state. false if lang is CL or CUDA.

Returns:

  • (Boolean)

    the boolean evaluation of the use_vla state. false if lang is CL or CUDA.



144
# File 'lib/BOAST/Language/Config.rb', line 144

boolean_state_accessor :use_vla

.use_vla_old?Object

Returns the boolean evaluation of the use_vla state.

Returns:

  • the boolean evaluation of the use_vla state



134
# File 'lib/BOAST/Language/Config.rb', line 134

boolean_state_accessor :use_vla

.verboseObject

Returns the BOAST verbose state.

Returns:

  • the BOAST verbose state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor verbose

.verbose=(val) ⇒ Object

Sets verbose state to a new value

Parameters:

  • val

    the new value of verbose state

Returns:

  • the new verbose state



1
# File 'lib/BOAST/Runtime/Config.rb', line 1

state_accessor verbose

.verbose?Object

Returns the boolean evaluation of the verbose state.

Returns:

  • the boolean evaluation of the verbose state



55
# File 'lib/BOAST/Runtime/Config.rb', line 55

boolean_state_accessor :verbose