Class: BOAST::CustomType

Inherits:
Object show all
Defined in:
lib/BOAST/Algorithm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ CustomType

Returns a new instance of CustomType.



542
543
544
545
546
# File 'lib/BOAST/Algorithm.rb', line 542

def initialize(hash={})
  @name = hash[:type_name]
  @size = hash[:size]
  @vector_length = hash[:vector_length]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



541
542
543
# File 'lib/BOAST/Algorithm.rb', line 541

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



541
542
543
# File 'lib/BOAST/Algorithm.rb', line 541

def size
  @size
end

#vector_lengthObject (readonly)

Returns the value of attribute vector_length.



541
542
543
# File 'lib/BOAST/Algorithm.rb', line 541

def vector_length
  @vector_length
end

Instance Method Details

#declObject



547
548
549
# File 'lib/BOAST/Algorithm.rb', line 547

def decl
  return "#{@name}" if [C, CL, CUDA].include?( BOAST::get_lang )
end