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/MPPARuntime.rb,
lib/BOAST/Runtime/OpenCLTypes.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/Language/CPUID_by_name.rb,
lib/BOAST/Runtime/FORTRANRuntime.rb,
lib/BOAST/Runtime/CompiledRuntime.rb,
lib/BOAST/Language/ControlStructure.rb,
lib/BOAST/Optimization/Optimization.rb

Defined Under Namespace

Modules: AffinityProbe, Annotation, Arithmetic, CRuntime, CUDARuntime, CompiledRuntime, Compilers, FFIRuntime, FORTRANRuntime, Functor, Functors, Inspectable, Intrinsics, MPPAProbe, MPPARuntime, OpenCLHelper, OpenCLRuntime, OpenMP, PAPIProbe, PrivateStateAccessor, 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, If, Index, Int, InternalIntrinsicsError, IntrinsicsError, LanguageError, Less, LessOrEqual, Load, MaskLoad, MaskStore, Minus, Multiplication, Not, Operator, OperatorError, OptimizationParameter, OptimizationSpace, Optimizer, Or, Plus, Pragma, Procedure, Real, Reference, Set, Sizet, Slice, Store, Substraction, Ternary, Variable, While

Constant Summary collapse

FORTRAN =
1
C =
2
CL =
3
CUDA =
4
X86 =
1
ARM =
2
MPPA =
3
FUNCCALLS =
{}
Var =
Variable
Dim =
Dimension
Call =
FuncCall
MODELS =
{ "native" => native_flags }
INSTRUCTIONS =
{}
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 => '',
  :OPENMP => false
}
@@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

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, 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



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

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



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

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



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

boolean_state_accessor :annotate

.annotate_indepth_listObject

Returns the BOAST annotate_indepth_list state.

Returns:

  • the BOAST annotate_indepth_list state



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

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



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

state_accessor :annotate_indepth_list

.annotate_levelObject

Returns the BOAST annotate_level state.

Returns:

  • the BOAST annotate_level state



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

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



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

state_accessor :annotate_level

.annotate_listObject

Returns the BOAST annotate_list state.

Returns:

  • the BOAST annotate_list state



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

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



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

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



149
150
151
152
153
# File 'lib/BOAST/Language/Algorithm.rb', line 149

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



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

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



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

state_accessor :architecture

.array_startObject

Returns the BOAST array_start state.

Returns:

  • the BOAST array_start state



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

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



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

state_accessor :array_start

.assert_boast_config_dirObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/BOAST/Language/Config.rb', line 19

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



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

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



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

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



201
202
203
# File 'lib/BOAST/Language/Algorithm.rb', line 201

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



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

boolean_state_accessor :debug

.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



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

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



185
186
187
188
189
# File 'lib/BOAST/Language/Algorithm.rb', line 185

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



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

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



138
139
140
# File 'lib/BOAST/Language/Algorithm.rb', line 138

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



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

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



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

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



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

boolean_state_accessor :default_int_signed

.default_int_sizeObject

Returns the BOAST default_int_size state.

Returns:

  • the BOAST default_int_size state



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

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



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

state_accessor :default_int_size

.default_real_sizeObject

Returns the BOAST default_real_size state.

Returns:

  • the BOAST default_real_size state



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

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



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

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

.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



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

boolean_state_accessor :disable_openmp

.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



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

boolean_state_accessor :ffi

.fortran_line_lengthObject

Returns the BOAST fortran_line_length state.

Returns:

  • the BOAST fortran_line_length state



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

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



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

state_accessor         :fortran_line_length

.get_address_sizeObject

Returns the address_size state.

Returns:

  • the address_size state



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

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



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

state_accessor :annotate_indepth_list

.get_annotate_levelObject

Returns the annotate_level state.

Returns:

  • the annotate_level state



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

state_accessor :annotate_level

.get_annotate_listObject

Returns the annotate_list state.

Returns:

  • the annotate_list state



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

state_accessor :annotate_list

.get_architectureObject

Returns the architecture state.

Returns:

  • the architecture state



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

state_accessor :architecture

.get_architecture_nameObject

Returns the symbol corresponding to the active architecture



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/BOAST/Language/Algorithm.rb', line 55

def get_architecture_name
  case architecture
  when X86
    return :X86
  when ARM
    return :ARM
  when MPPA
    return :MPPA
  else
    return nil
  end
end

.get_array_startObject

Returns the array_start state.

Returns:

  • the array_start state



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

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



97
98
99
# File 'lib/BOAST/Runtime/Config.rb', line 97

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_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



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

default_state_getter :address_size,          OS.bits/8

.get_default_alignObject

Returns the default_align state.

Returns:

  • the default_align state



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

state_accessor :default_align

.get_default_annotateObject



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

default_state_getter :annotate,              false

.get_default_annotate_indepth_listObject



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

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

.get_default_annotate_levelObject



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

default_state_getter :annotate_level,        0

.get_default_annotate_listObject



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

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

.get_default_architectureObject



139
140
141
142
143
144
145
# File 'lib/BOAST/Language/Config.rb', line 139

def get_default_architecture
  architecture = const_get(ENV["ARCHITECTURE"]) if ENV["ARCHITECTURE"]
  architecture = const_get(ENV["ARCH"]) if not architecture and ENV["ARCH"]
  return architecture if architecture
  return ARM if YAML::load( OS.report )["host_cpu"].match("arm")
  return X86
end

.get_default_array_startObject



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

default_state_getter :array_start,           1

.get_default_boast_inspectObject



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

default_state_getter :boast_inspect, false, nil, :INSPECT

.get_default_debugObject



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

default_state_getter :debug,                 false

.get_default_debug_sourceObject



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

default_state_getter :debug_source,        false

.get_default_default_alignObject



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

default_state_getter :default_align,         1

.get_default_default_int_signedObject



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

default_state_getter :default_int_signed,    true

.get_default_default_int_sizeObject



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

default_state_getter :default_int_size,      4

.get_default_default_real_sizeObject



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

default_state_getter :default_real_size,     8

.get_default_disable_openmpObject



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

default_state_getter :disable_openmp,        false

.get_default_ffiObject



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

default_state_getter :ffi,                 false

.get_default_fortran_line_lengthObject



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

default_state_getter :fortran_line_length, 72

.get_default_indent_incrementObject



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

default_state_getter :indent_increment,      2

.get_default_indent_levelObject



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

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



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

state_accessor :default_int_size

.get_default_keep_tempObject



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

default_state_getter :keep_temp,           false

.get_default_langObject



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

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

.get_default_modelObject



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

default_state_getter :model,                 "native"

.get_default_optimizer_logObject



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

default_state_getter :optimizer_log,         false

.get_default_optimizer_log_fileObject



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

default_state_getter :optimizer_log_file,    nil

.get_default_real_sizeObject

Returns the default_real_size state.

Returns:

  • the default_real_size state



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

state_accessor :default_real_size

.get_default_replace_constantsObject



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

default_state_getter :replace_constants,     true

.get_default_use_vlaObject



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

default_state_getter :use_vla,               false

.get_default_verboseObject



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

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_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



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

state_accessor         :fortran_line_length

.get_indent_incrementObject

Returns the indent_increment state.

Returns:

  • the indent_increment state



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

state_accessor :indent_increment

.get_indent_levelObject

Returns the indent_level state.

Returns:

  • the indent_level state



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

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



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

state_accessor :lang

.get_lang_nameObject

Returns the symbol corresponding to the active language



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/BOAST/Language/Algorithm.rb', line 69

def get_lang_name
  case lang
  when C
    return :C
  when FORTRAN
    return :FORTRAN
  when CL
    return :CL
  when CUDA
    return :CUDA
  else
    nil
  end
end

.get_modelObject

Returns the model state.

Returns:

  • the model state



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

state_accessor :model

.get_openmp_flagsObject



93
94
95
# File 'lib/BOAST/Runtime/Config.rb', line 93

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



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

state_accessor :optimizer_log_file

.get_outputObject

Returns the output state.

Returns:

  • the output state



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

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



120
121
122
# File 'lib/BOAST/Runtime/Config.rb', line 120

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



132
133
134
# File 'lib/BOAST/Language/Algorithm.rb', line 132

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.



143
144
145
# File 'lib/BOAST/Language/Algorithm.rb', line 143

def indent
   return " "*get_indent_level
end

.indent_incrementObject

Returns the BOAST indent_increment state.

Returns:

  • the BOAST indent_increment state



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

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



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

state_accessor :indent_increment

.indent_levelObject

Returns the BOAST indent_level state.

Returns:

  • the BOAST indent_level state



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

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



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

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



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

boolean_state_accessor :keep_temp

.langObject

Returns the BOAST lang state.

Returns:

  • the BOAST lang state



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

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



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

state_accessor :lang

.modelObject

Returns the BOAST model state.

Returns:

  • the BOAST model state



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

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



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

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



194
195
196
# File 'lib/BOAST/Language/Algorithm.rb', line 194

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



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

boolean_state_accessor :optimizer_log

.optimizer_log_fileObject

Returns the BOAST optimizer_log_file state.

Returns:

  • the BOAST optimizer_log_file state



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

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



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

state_accessor :optimizer_log_file

.outputObject

Returns the BOAST output state.

Returns:

  • the BOAST output state



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

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



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

state_accessor :output

.pop_env(*vars) ⇒ Object

Pops the specified states values

Parameters:

  • vars

    a list of state symbols



121
122
123
124
125
126
127
128
# File 'lib/BOAST/Language/Algorithm.rb', line 121

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::class_variable_set("@@"+key.to_s, ret)
  }
end

.pr(a, *args) ⇒ 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



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

def pr(a, *args)
  pr_annotate(a) if annotate?
  a.pr(*args)
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



159
160
161
162
163
164
165
166
167
168
169
# File 'lib/BOAST/Language/Algorithm.rb', line 159

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



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/BOAST/Language/Algorithm.rb', line 96

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

.read_boast_compiler_configObject



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/BOAST/Runtime/Config.rb', line 62

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



30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/BOAST/Language/Config.rb', line 30

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



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/BOAST/Runtime/Config.rb', line 101

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
# File 'lib/BOAST/Language/Parens.rb', line 7

def register_funccall(name, options = {})
  sym = name.to_sym
  FUNCCALLS[sym] = {}
  FUNCCALLS[sym][:parameters] = options[:parameters]
  FUNCCALLS[sym][:returns] = options[:returns]
  s =<<EOF
  def self.#{name}(*args)
    return FuncCall(#{sym.inspect}, *args#{options[:returns] ? ", returns: FUNCCALLS[#{sym.inspect}][:returns]" : ""})
  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



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

boolean_state_accessor :replace_constants

.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



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

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



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

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



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

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



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

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



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

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



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

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_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



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

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



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

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



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

state_accessor :default_real_size

.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_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



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

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



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

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



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

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



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

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



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

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



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

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



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

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.



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

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



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

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



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

boolean_state_accessor :verbose