Class: BOAST::Sizet
Instance Attribute Summary collapse
-
#signed ⇒ Object
readonly
Returns the value of attribute signed.
Class Method Summary collapse
Instance Method Summary collapse
- #decl ⇒ Object
-
#initialize(hash = {}) ⇒ Sizet
constructor
A new instance of Sizet.
Constructor Details
#initialize(hash = {}) ⇒ Sizet
Returns a new instance of Sizet.
1099 1100 1101 1102 1103 |
# File 'lib/BOAST/Algorithm.rb', line 1099 def initialize(hash={}) if hash[:signed] != nil then @signed = hash[:signed] end end |
Instance Attribute Details
#signed ⇒ Object (readonly)
Returns the value of attribute signed.
1098 1099 1100 |
# File 'lib/BOAST/Algorithm.rb', line 1098 def signed @signed end |
Class Method Details
Instance Method Details
#decl ⇒ Object
1104 1105 1106 1107 1108 1109 1110 1111 |
# File 'lib/BOAST/Algorithm.rb', line 1104 def decl return "integer(kind=#{BOAST::get_default_int_size})" if BOAST::get_lang == FORTRAN if not @signed then return "size_t" if [C, CL, CUDA].include?( BOAST::get_lang ) else return "ptrdiff_t" if [C, CL, CUDA].include?( BOAST::get_lang ) end end |