Class: BOAST::OpenMP::OpenMPControlStructure
Instance Attribute Summary
#args
Instance Method Summary
collapse
Methods included from Pragma
#openmp_end_clauses_to_s, #openmp_open_clauses_to_s, #openmp_pragma_to_s, register_clause
#[], inherited, token_string_generator
#inspect
private_boolean_state_accessor, private_state_accessor
Constructor Details
Returns a new instance of OpenMPControlStructure.
142
143
144
145
|
# File 'lib/BOAST/Language/OpenMP.rb', line 142
def initialize(options = {}, &block)
@openmp_clauses = options
@block = block
end
|
Instance Method Details
#close ⇒ Object
168
169
170
171
|
# File 'lib/BOAST/Language/OpenMP.rb', line 168
def close
output.puts end_string(openmp_end_clauses_to_s)
return self
end
|
#get_strings ⇒ Object
137
138
139
140
|
# File 'lib/BOAST/Language/OpenMP.rb', line 137
def get_strings
return { C => get_c_strings,
FORTRAN => get_fortran_strings }
end
|
#open ⇒ Object
154
155
156
157
|
# File 'lib/BOAST/Language/OpenMP.rb', line 154
def open
output.puts to_s
return self
end
|
#pr(*args) ⇒ Object
159
160
161
162
163
164
165
166
|
# File 'lib/BOAST/Language/OpenMP.rb', line 159
def pr(*args)
open
if @block then
@block.call(*args)
close
end
return self
end
|
#to_s ⇒ Object
150
151
152
|
# File 'lib/BOAST/Language/OpenMP.rb', line 150
def to_s
return begin_string(openmp_open_clauses_to_s)
end
|