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.
1086 1087 1088 1089 1090 |
# File 'lib/BOAST/Algorithm.rb', line 1086 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.
1085 1086 1087 |
# File 'lib/BOAST/Algorithm.rb', line 1085 def signed @signed end |
Class Method Details
Instance Method Details
#decl ⇒ Object
1091 1092 1093 1094 1095 1096 1097 1098 |
# File 'lib/BOAST/Algorithm.rb', line 1091 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 |