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
-
.address_size ⇒ Object
The BOAST address_size state.
-
.address_size=(val) ⇒ Object
Sets address_size state to a new value.
-
.annotate ⇒ Object
The BOAST annotate state.
-
.annotate=(val) ⇒ Object
Sets annotate state to a new value.
-
.annotate? ⇒ Object
The boolean evaluation of the annotate state.
-
.annotate_indepth_list ⇒ Object
The BOAST annotate_indepth_list state.
-
.annotate_indepth_list=(val) ⇒ Object
Sets annotate_indepth_list state to a new value.
-
.annotate_level ⇒ Object
The BOAST annotate_level state.
-
.annotate_level=(val) ⇒ Object
Sets annotate_level state to a new value.
-
.annotate_list ⇒ Object
The BOAST annotate_list state.
-
.annotate_list=(val) ⇒ Object
Sets annotate_list state to a new value.
-
.annotate_number(name) ⇒ Object
Returns an annotation number for the given name.
-
.architecture ⇒ Object
The BOAST architecture state.
-
.architecture=(val) ⇒ Object
Sets architecture state to a new value.
-
.array_start ⇒ Object
The BOAST array_start state.
-
.array_start=(val) ⇒ Object
Sets array_start state to a new value.
- .assert_boast_config_dir ⇒ Object
-
.boast_inspect ⇒ Object
The BOAST boast_inspect state.
-
.boast_inspect=(val) ⇒ Object
Sets boast_inspect state to a new value.
-
.boast_inspect? ⇒ Object
The boolean evaluation of the boast_inspect state.
-
.boolean_state_accessor(state) ⇒ Object
Generates setters and getters for the specified boolean state.
-
.chain_code ⇒ Object
The BOAST chain_code state.
-
.chain_code=(val) ⇒ Object
Sets chain_code state to a new value.
-
.chain_code? ⇒ Object
The boolean evaluation of the chain_code state.
-
.close(a) ⇒ Object
One of BOAST keywords: closes a BOAST ControlStructure or Procedure.
-
.debug ⇒ Object
The BOAST debug state.
-
.debug=(val) ⇒ Object
Sets debug state to a new value.
-
.debug? ⇒ Object
The boolean evaluation of the debug state.
-
.debug_source ⇒ Object
The BOAST debug_source state.
-
.debug_source=(val) ⇒ Object
Sets debug_source state to a new value.
-
.debug_source? ⇒ Object
The boolean evaluation of the debug_source state.
-
.decl(*list) ⇒ Object
One of BOAST keywords: declares BOAST Variables and Procedures.
-
.decl_module ⇒ Object
The BOAST decl_module state.
-
.decl_module=(val) ⇒ Object
Sets decl_module state to a new value.
-
.decl_module? ⇒ Object
The boolean evaluation of the decl_module state.
-
.decrement_indent_level(increment = get_indent_increment) ⇒ Object
Decrements the indent level.
-
.default_align ⇒ Object
The BOAST default_align state.
-
.default_align=(val) ⇒ Object
Sets default_align state to a new value.
-
.default_int_signed ⇒ Object
The BOAST default_int_signed state.
-
.default_int_signed=(val) ⇒ Object
Sets default_int_signed state to a new value.
-
.default_int_signed? ⇒ Object
The boolean evaluation of the default_int_signed state.
-
.default_int_size ⇒ Object
The BOAST default_int_size state.
-
.default_int_size=(val) ⇒ Object
Sets default_int_size state to a new value.
-
.default_real_size ⇒ Object
The BOAST default_real_size state.
-
.default_real_size=(val) ⇒ Object
Sets default_real_size state to a new value.
-
.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.
-
.disable_openmp ⇒ Object
The BOAST disable_openmp state.
-
.disable_openmp=(val) ⇒ Object
Sets disable_openmp state to a new value.
-
.disable_openmp? ⇒ Object
The boolean evaluation of the disable_openmp state.
-
.ffi ⇒ Object
The BOAST ffi state.
-
.ffi=(val) ⇒ Object
Sets ffi state to a new value.
-
.ffi? ⇒ Object
The boolean evaluation of the ffi state.
-
.fortran_line_length ⇒ Object
The BOAST fortran_line_length state.
-
.fortran_line_length=(val) ⇒ Object
Sets fortran_line_length state to a new value.
-
.get_address_size ⇒ Object
The address_size state.
-
.get_annotate ⇒ Object
The annotate state.
-
.get_annotate_indepth_list ⇒ Object
The annotate_indepth_list state.
-
.get_annotate_level ⇒ Object
The annotate_level state.
-
.get_annotate_list ⇒ Object
The annotate_list state.
-
.get_architecture ⇒ Object
The architecture state.
-
.get_architecture_name ⇒ Object
Returns the symbol corresponding to the active architecture.
-
.get_array_start ⇒ Object
The array_start state.
-
.get_boast_inspect ⇒ Object
The boast_inspect state.
-
.get_chain_code ⇒ Object
The chain_code state.
- .get_compiler_options ⇒ Object
-
.get_debug ⇒ Object
The debug state.
-
.get_debug_source ⇒ Object
The debug_source state.
-
.get_decl_module ⇒ Object
The decl_module state.
- .get_default_address_size ⇒ Object
-
.get_default_align ⇒ Object
The default_align state.
- .get_default_annotate ⇒ Object
- .get_default_annotate_indepth_list ⇒ Object
- .get_default_annotate_level ⇒ Object
- .get_default_annotate_list ⇒ Object
- .get_default_architecture ⇒ Object
- .get_default_array_start ⇒ Object
- .get_default_boast_inspect ⇒ Object
- .get_default_debug ⇒ Object
- .get_default_debug_source ⇒ Object
- .get_default_default_align ⇒ Object
- .get_default_default_int_signed ⇒ Object
- .get_default_default_int_size ⇒ Object
- .get_default_default_real_size ⇒ Object
- .get_default_disable_openmp ⇒ Object
- .get_default_ffi ⇒ Object
- .get_default_fortran_line_length ⇒ Object
- .get_default_indent_increment ⇒ Object
- .get_default_indent_level ⇒ Object
-
.get_default_int_signed ⇒ Object
The default_int_signed state.
-
.get_default_int_size ⇒ Object
The default_int_size state.
- .get_default_keep_temp ⇒ Object
- .get_default_lang ⇒ Object
- .get_default_model ⇒ Object
- .get_default_optimizer_log ⇒ Object
- .get_default_optimizer_log_file ⇒ Object
-
.get_default_real_size ⇒ Object
The default_real_size state.
- .get_default_replace_constants ⇒ Object
- .get_default_use_vla ⇒ Object
- .get_default_verbose ⇒ Object
-
.get_disable_openmp ⇒ Object
The disable_openmp state.
-
.get_ffi ⇒ Object
The ffi state.
-
.get_fortran_line_length ⇒ Object
The fortran_line_length state.
-
.get_indent_increment ⇒ Object
The indent_increment state.
-
.get_indent_level ⇒ Object
The indent_level state.
-
.get_keep_temp ⇒ Object
The keep_temp state.
-
.get_lang ⇒ Object
The lang state.
-
.get_lang_name ⇒ Object
Returns the symbol corresponding to the active language.
-
.get_model ⇒ Object
The model state.
- .get_openmp_flags ⇒ Object
-
.get_optimizer_log ⇒ Object
The optimizer_log state.
-
.get_optimizer_log_file ⇒ Object
The optimizer_log_file state.
-
.get_output ⇒ Object
The output state.
-
.get_replace_constants ⇒ Object
The replace_constants state.
- .get_run_config ⇒ Object
-
.get_use_vla ⇒ Object
The use_vla state.
-
.get_verbose ⇒ Object
The verbose state.
- .included(base) ⇒ Object
-
.increment_indent_level(increment = get_indent_increment) ⇒ Object
Increments the indent level.
-
.indent ⇒ Object
Returns a string with as many space as the indent level.
-
.indent_increment ⇒ Object
The BOAST indent_increment state.
-
.indent_increment=(val) ⇒ Object
Sets indent_increment state to a new value.
-
.indent_level ⇒ Object
The BOAST indent_level state.
-
.indent_level=(val) ⇒ Object
Sets indent_level state to a new value.
-
.keep_temp ⇒ Object
The BOAST keep_temp state.
-
.keep_temp=(val) ⇒ Object
Sets keep_temp state to a new value.
-
.keep_temp? ⇒ Object
The boolean evaluation of the keep_temp state.
-
.lang ⇒ Object
The BOAST lang state.
-
.lang=(val) ⇒ Object
Sets lang state to a new value.
-
.model ⇒ Object
The BOAST model state.
-
.model=(val) ⇒ Object
Sets model state to a new value.
- .open(a) ⇒ Object deprecated Deprecated.
-
.opn(a) ⇒ Object
One of BOAST keywords: opens a BOAST ControlStructure or Procedure.
-
.optimizer_log ⇒ Object
The BOAST optimizer_log state.
-
.optimizer_log=(val) ⇒ Object
Sets optimizer_log state to a new value.
-
.optimizer_log? ⇒ Object
The boolean evaluation of the optimizer_log state.
-
.optimizer_log_file ⇒ Object
The BOAST optimizer_log_file state.
-
.optimizer_log_file=(val) ⇒ Object
Sets optimizer_log_file state to a new value.
-
.output ⇒ Object
The BOAST output state.
-
.output=(val) ⇒ Object
Sets output state to a new value.
-
.pop_env(*vars) ⇒ Object
Pops the specified states values.
-
.pr(a, *args) ⇒ Object
One of BOAST keywords: prints BOAST objects.
-
.pr_annotate(a) ⇒ Object
Annotates an Object by inlining a YAML structure in a comment.
- .print(a, *args) ⇒ Object deprecated Deprecated.
-
.push_env(vars) { ... } ⇒ Object
Updates states and stores their value in a stack for later retrieval.
- .read_boast_compiler_config ⇒ Object
- .read_boast_config ⇒ Object
- .read_boast_run_config ⇒ Object
- .register_funccall(name, options = {}) ⇒ Object
-
.replace_constants ⇒ Object
The BOAST replace_constants state.
-
.replace_constants=(val) ⇒ Object
Sets replace_constants state to a new value.
-
.replace_constants? ⇒ Object
The boolean evaluation of the replace_constants state.
-
.set_address_size(val) ⇒ Object
Sets address_size state to a new value.
-
.set_annotate(val) ⇒ Object
Sets annotate state to a new value.
-
.set_annotate_indepth_list(val) ⇒ Object
Sets annotate_indepth_list state to a new value.
-
.set_annotate_level(val) ⇒ Object
Sets annotate_level state to a new value.
-
.set_annotate_list(val) ⇒ Object
Sets annotate_list state to a new value.
-
.set_architecture(val) ⇒ Object
Sets architecture state to a new value.
-
.set_array_start(val) ⇒ Object
Sets array_start state to a new value.
-
.set_boast_inspect(val) ⇒ Object
Sets boast_inspect state to a new value.
-
.set_chain_code(val) ⇒ Object
Sets chain_code state to a new value.
-
.set_debug(val) ⇒ Object
Sets debug state to a new value.
-
.set_debug_source(val) ⇒ Object
Sets debug_source state to a new value.
-
.set_decl_module(val) ⇒ Object
Sets decl_module state to a new value.
-
.set_default_align(val) ⇒ Object
Sets default_align state to a new value.
-
.set_default_int_signed(val) ⇒ Object
Sets default_int_signed state to a new value.
-
.set_default_int_size(val) ⇒ Object
Sets default_int_size state to a new value.
-
.set_default_real_size(val) ⇒ Object
Sets default_real_size state to a new value.
-
.set_disable_openmp(val) ⇒ Object
Sets disable_openmp state to a new value.
-
.set_ffi(val) ⇒ Object
Sets ffi state to a new value.
-
.set_fortran_line_length(val) ⇒ Object
Sets fortran_line_length state to a new value.
-
.set_indent_increment(val) ⇒ Object
Sets indent_increment state to a new value.
-
.set_indent_level(val) ⇒ Object
Sets indent_level state to a new value.
-
.set_keep_temp(val) ⇒ Object
Sets keep_temp state to a new value.
-
.set_lang(val) ⇒ Object
Sets lang state to a new value.
-
.set_model(val) ⇒ Object
Sets model state to a new value.
-
.set_optimizer_log(val) ⇒ Object
Sets optimizer_log state to a new value.
-
.set_optimizer_log_file(val) ⇒ Object
Sets optimizer_log_file state to a new value.
-
.set_output(val) ⇒ Object
Sets output state to a new value.
-
.set_replace_constants(val) ⇒ Object
Sets replace_constants state to a new value.
-
.set_use_vla(val) ⇒ Object
Sets use_vla state to a new value.
-
.set_verbose(val) ⇒ Object
Sets verbose state to a new value.
-
.state_accessor(state) ⇒ Object
Generates setters and getters for the specified state.
-
.use_vla ⇒ Object
The BOAST use_vla state.
-
.use_vla=(val) ⇒ Object
Sets use_vla state to a new value.
-
.use_vla? ⇒ Boolean
The boolean evaluation of the use_vla state.
-
.use_vla_old? ⇒ Object
The boolean evaluation of the use_vla state.
-
.verbose ⇒ Object
The BOAST verbose state.
-
.verbose=(val) ⇒ Object
Sets verbose state to a new value.
-
.verbose? ⇒ Object
The boolean evaluation of the verbose state.
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
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_size ⇒ Object
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
81 |
# File 'lib/BOAST/Language/Config.rb', line 81 state_accessor :address_size |
.annotate ⇒ Object
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
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor annotate |
.annotate? ⇒ Object
Returns the boolean evaluation of the annotate state.
99 |
# File 'lib/BOAST/Language/Config.rb', line 99 boolean_state_accessor :annotate |
.annotate_indepth_list ⇒ Object
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
89 |
# File 'lib/BOAST/Language/Config.rb', line 89 state_accessor :annotate_indepth_list |
.annotate_level ⇒ Object
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
90 |
# File 'lib/BOAST/Language/Config.rb', line 90 state_accessor :annotate_level |
.annotate_list ⇒ Object
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
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 |
.architecture ⇒ Object
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
79 |
# File 'lib/BOAST/Language/Config.rb', line 79 state_accessor :architecture |
.array_start ⇒ Object
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
85 |
# File 'lib/BOAST/Language/Config.rb', line 85 state_accessor :array_start |
.assert_boast_config_dir ⇒ Object
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_inspect ⇒ Object
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
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.
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
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_code ⇒ Object
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
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.
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.
201 202 203 |
# File 'lib/BOAST/Language/Algorithm.rb', line 201 def close(a) a.close end |
.debug ⇒ Object
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
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor debug |
.debug? ⇒ Object
Returns the boolean evaluation of the debug state.
96 |
# File 'lib/BOAST/Language/Config.rb', line 96 boolean_state_accessor :debug |
.debug_source ⇒ Object
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
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.
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.
185 186 187 188 189 |
# File 'lib/BOAST/Language/Algorithm.rb', line 185 def decl(*list) list.each { |d| d.decl } end |
.decl_module ⇒ Object
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
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.
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
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_align ⇒ Object
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
84 |
# File 'lib/BOAST/Language/Config.rb', line 84 state_accessor :default_align |
.default_int_signed ⇒ Object
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
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.
94 |
# File 'lib/BOAST/Language/Config.rb', line 94 boolean_state_accessor :default_int_signed |
.default_int_size ⇒ Object
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
82 |
# File 'lib/BOAST/Language/Config.rb', line 82 state_accessor :default_int_size |
.default_real_size ⇒ Object
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
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.
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_openmp ⇒ Object
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
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.
101 |
# File 'lib/BOAST/Language/Config.rb', line 101 boolean_state_accessor :disable_openmp |
.ffi ⇒ Object
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
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor ffi |
.ffi? ⇒ Object
Returns the boolean evaluation of the ffi state.
51 |
# File 'lib/BOAST/Runtime/Config.rb', line 51 boolean_state_accessor :ffi |
.fortran_line_length ⇒ Object
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
53 |
# File 'lib/BOAST/Runtime/Config.rb', line 53 state_accessor :fortran_line_length |
.get_address_size ⇒ Object
Returns the address_size state.
81 |
# File 'lib/BOAST/Language/Config.rb', line 81 state_accessor :address_size |
.get_annotate ⇒ Object
Returns the annotate state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor annotate |
.get_annotate_indepth_list ⇒ Object
Returns the annotate_indepth_list state.
89 |
# File 'lib/BOAST/Language/Config.rb', line 89 state_accessor :annotate_indepth_list |
.get_annotate_level ⇒ Object
Returns the annotate_level state.
90 |
# File 'lib/BOAST/Language/Config.rb', line 90 state_accessor :annotate_level |
.get_annotate_list ⇒ Object
Returns the annotate_list state.
88 |
# File 'lib/BOAST/Language/Config.rb', line 88 state_accessor :annotate_list |
.get_architecture ⇒ Object
Returns the architecture state.
79 |
# File 'lib/BOAST/Language/Config.rb', line 79 state_accessor :architecture |
.get_architecture_name ⇒ Object
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_start ⇒ Object
Returns the array_start state.
85 |
# File 'lib/BOAST/Language/Config.rb', line 85 state_accessor :array_start |
.get_boast_inspect ⇒ Object
Returns the boast_inspect state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor boast_inspect |
.get_chain_code ⇒ Object
Returns the chain_code state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor chain_code |
.get_compiler_options ⇒ Object
97 98 99 |
# File 'lib/BOAST/Runtime/Config.rb', line 97 def return @@compiler_default_options.clone end |
.get_debug ⇒ Object
Returns the debug state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor debug |
.get_debug_source ⇒ Object
Returns the debug_source state.
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor debug_source |
.get_decl_module ⇒ Object
Returns the decl_module state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor decl_module |
.get_default_address_size ⇒ Object
105 |
# File 'lib/BOAST/Language/Config.rb', line 105 default_state_getter :address_size, OS.bits/8 |
.get_default_align ⇒ Object
Returns the default_align state.
84 |
# File 'lib/BOAST/Language/Config.rb', line 84 state_accessor :default_align |
.get_default_annotate ⇒ Object
118 |
# File 'lib/BOAST/Language/Config.rb', line 118 default_state_getter :annotate, false |
.get_default_annotate_indepth_list ⇒ Object
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_level ⇒ Object
121 |
# File 'lib/BOAST/Language/Config.rb', line 121 default_state_getter :annotate_level, 0 |
.get_default_annotate_list ⇒ Object
119 |
# File 'lib/BOAST/Language/Config.rb', line 119 default_state_getter :annotate_list, ["For"], '"#{envs}.split(\",\").collect { |arg| YAML::load(arg) }"' |
.get_default_architecture ⇒ Object
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_start ⇒ Object
117 |
# File 'lib/BOAST/Language/Config.rb', line 117 default_state_getter :array_start, 1 |
.get_default_boast_inspect ⇒ Object
125 |
# File 'lib/BOAST/Language/Config.rb', line 125 default_state_getter :boast_inspect, false, nil, :INSPECT |
.get_default_debug ⇒ Object
108 |
# File 'lib/BOAST/Language/Config.rb', line 108 default_state_getter :debug, false |
.get_default_debug_source ⇒ Object
55 |
# File 'lib/BOAST/Runtime/Config.rb', line 55 default_state_getter :debug_source, false |
.get_default_default_align ⇒ Object
114 |
# File 'lib/BOAST/Language/Config.rb', line 114 default_state_getter :default_align, 1 |
.get_default_default_int_signed ⇒ Object
111 |
# File 'lib/BOAST/Language/Config.rb', line 111 default_state_getter :default_int_signed, true |
.get_default_default_int_size ⇒ Object
112 |
# File 'lib/BOAST/Language/Config.rb', line 112 default_state_getter :default_int_size, 4 |
.get_default_default_real_size ⇒ Object
113 |
# File 'lib/BOAST/Language/Config.rb', line 113 default_state_getter :default_real_size, 8 |
.get_default_disable_openmp ⇒ Object
124 |
# File 'lib/BOAST/Language/Config.rb', line 124 default_state_getter :disable_openmp, false |
.get_default_ffi ⇒ Object
56 |
# File 'lib/BOAST/Runtime/Config.rb', line 56 default_state_getter :ffi, false |
.get_default_fortran_line_length ⇒ Object
58 |
# File 'lib/BOAST/Runtime/Config.rb', line 58 default_state_getter :fortran_line_length, 72 |
.get_default_indent_increment ⇒ Object
116 |
# File 'lib/BOAST/Language/Config.rb', line 116 default_state_getter :indent_increment, 2 |
.get_default_indent_level ⇒ Object
115 |
# File 'lib/BOAST/Language/Config.rb', line 115 default_state_getter :indent_level, 0 |
.get_default_int_signed ⇒ Object
Returns the default_int_signed state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor default_int_signed |
.get_default_int_size ⇒ Object
Returns the default_int_size state.
82 |
# File 'lib/BOAST/Language/Config.rb', line 82 state_accessor :default_int_size |
.get_default_keep_temp ⇒ Object
57 |
# File 'lib/BOAST/Runtime/Config.rb', line 57 default_state_getter :keep_temp, false |
.get_default_lang ⇒ Object
106 |
# File 'lib/BOAST/Language/Config.rb', line 106 default_state_getter :lang, FORTRAN, '"const_get(#{envs})"', :BOAST_LANG |
.get_default_model ⇒ Object
107 |
# File 'lib/BOAST/Language/Config.rb', line 107 default_state_getter :model, "native" |
.get_default_optimizer_log ⇒ Object
122 |
# File 'lib/BOAST/Language/Config.rb', line 122 default_state_getter :optimizer_log, false |
.get_default_optimizer_log_file ⇒ Object
123 |
# File 'lib/BOAST/Language/Config.rb', line 123 default_state_getter :optimizer_log_file, nil |
.get_default_real_size ⇒ Object
Returns the default_real_size state.
83 |
# File 'lib/BOAST/Language/Config.rb', line 83 state_accessor :default_real_size |
.get_default_replace_constants ⇒ Object
110 |
# File 'lib/BOAST/Language/Config.rb', line 110 default_state_getter :replace_constants, true |
.get_default_use_vla ⇒ Object
109 |
# File 'lib/BOAST/Language/Config.rb', line 109 default_state_getter :use_vla, false |
.get_default_verbose ⇒ Object
54 |
# File 'lib/BOAST/Runtime/Config.rb', line 54 default_state_getter :verbose, false |
.get_disable_openmp ⇒ Object
Returns the disable_openmp state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor disable_openmp |
.get_ffi ⇒ Object
Returns the ffi state.
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor ffi |
.get_fortran_line_length ⇒ Object
Returns the fortran_line_length state.
53 |
# File 'lib/BOAST/Runtime/Config.rb', line 53 state_accessor :fortran_line_length |
.get_indent_increment ⇒ Object
Returns the indent_increment state.
87 |
# File 'lib/BOAST/Language/Config.rb', line 87 state_accessor :indent_increment |
.get_indent_level ⇒ Object
Returns the indent_level state.
86 |
# File 'lib/BOAST/Language/Config.rb', line 86 state_accessor :indent_level |
.get_keep_temp ⇒ Object
Returns the keep_temp state.
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor keep_temp |
.get_lang ⇒ Object
Returns the lang state.
78 |
# File 'lib/BOAST/Language/Config.rb', line 78 state_accessor :lang |
.get_lang_name ⇒ Object
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_model ⇒ Object
Returns the model state.
80 |
# File 'lib/BOAST/Language/Config.rb', line 80 state_accessor :model |
.get_openmp_flags ⇒ Object
93 94 95 |
# File 'lib/BOAST/Runtime/Config.rb', line 93 def get_openmp_flags return @@openmp_default_flags.clone end |
.get_optimizer_log ⇒ Object
Returns the optimizer_log state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor optimizer_log |
.get_optimizer_log_file ⇒ Object
Returns the optimizer_log_file state.
91 |
# File 'lib/BOAST/Language/Config.rb', line 91 state_accessor :optimizer_log_file |
.get_output ⇒ Object
Returns the output state.
77 |
# File 'lib/BOAST/Language/Config.rb', line 77 state_accessor :output |
.get_replace_constants ⇒ Object
Returns the replace_constants state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor replace_constants |
.get_run_config ⇒ Object
120 121 122 |
# File 'lib/BOAST/Runtime/Config.rb', line 120 def get_run_config return @@run_config.clone end |
.get_use_vla ⇒ Object
Returns the use_vla state.
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor use_vla |
.get_verbose ⇒ Object
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
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 |
.indent ⇒ Object
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_increment ⇒ Object
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
87 |
# File 'lib/BOAST/Language/Config.rb', line 87 state_accessor :indent_increment |
.indent_level ⇒ Object
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
86 |
# File 'lib/BOAST/Language/Config.rb', line 86 state_accessor :indent_level |
.keep_temp ⇒ Object
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
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.
52 |
# File 'lib/BOAST/Runtime/Config.rb', line 52 boolean_state_accessor :keep_temp |
.lang ⇒ Object
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
78 |
# File 'lib/BOAST/Language/Config.rb', line 78 state_accessor :lang |
.model ⇒ Object
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
80 |
# File 'lib/BOAST/Language/Config.rb', line 80 state_accessor :model |
.open(a) ⇒ Object
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.
194 195 196 |
# File 'lib/BOAST/Language/Algorithm.rb', line 194 def opn(a) a.open end |
.optimizer_log ⇒ Object
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
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.
100 |
# File 'lib/BOAST/Language/Config.rb', line 100 boolean_state_accessor :optimizer_log |
.optimizer_log_file ⇒ Object
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
91 |
# File 'lib/BOAST/Language/Config.rb', line 91 state_accessor :optimizer_log_file |
.output ⇒ Object
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
77 |
# File 'lib/BOAST/Language/Config.rb', line 77 state_accessor :output |
.pop_env(*vars) ⇒ Object
Pops the specified states values
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.
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.
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 |
.print(a, *args) ⇒ Object
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
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_config ⇒ Object
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 = "#{boast_config_dir}/compiler_options" if File::exist?( ) then File::open( , "r" ) { |f| @@compiler_default_options.update( YAML::load( f.read ) ) } else File::open( , "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_config ⇒ Object
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_config ⇒ Object
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, = {}) sym = name.to_sym FUNCCALLS[sym] = {} FUNCCALLS[sym][:parameters] = [:parameters] FUNCCALLS[sym][:returns] = [:returns] s =<<EOF def self.#{name}(*args) return FuncCall(#{sym.inspect}, *args#{[:returns] ? ", returns: FUNCCALLS[#{sym.inspect}][:returns]" : ""}) end EOF eval s end |
.replace_constants ⇒ Object
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
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.
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
81 |
# File 'lib/BOAST/Language/Config.rb', line 81 state_accessor :address_size |
.set_annotate(val) ⇒ Object
Sets annotate state to a new value
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
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
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
88 |
# File 'lib/BOAST/Language/Config.rb', line 88 state_accessor :annotate_list |
.set_architecture(val) ⇒ Object
Sets architecture state to a new value
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
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
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
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor chain_code |
.set_debug(val) ⇒ Object
Sets debug state to a new value
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
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
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
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
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
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
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
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor disable_openmp |
.set_ffi(val) ⇒ Object
Sets ffi state to a new value
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
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
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
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
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor keep_temp |
.set_lang(val) ⇒ Object
Sets lang state to a new value
78 |
# File 'lib/BOAST/Language/Config.rb', line 78 state_accessor :lang |
.set_model(val) ⇒ Object
Sets model state to a new value
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
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
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
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
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
1 |
# File 'lib/BOAST/Language/Config.rb', line 1 state_accessor use_vla |
.set_verbose(val) ⇒ Object
Sets verbose state to a new value
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor verbose |
.state_accessor(state) ⇒ Object
Generates setters and getters for the specified state
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_vla ⇒ Object
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
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.
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.
128 |
# File 'lib/BOAST/Language/Config.rb', line 128 boolean_state_accessor :use_vla |
.verbose ⇒ Object
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
1 |
# File 'lib/BOAST/Runtime/Config.rb', line 1 state_accessor verbose |
.verbose? ⇒ Object
Returns the boolean evaluation of the verbose state.
49 |
# File 'lib/BOAST/Runtime/Config.rb', line 49 boolean_state_accessor :verbose |