class BOAST::CustomType

@!parse module VarFunctors; var_functorize CustomType; end

Attributes

name[R]
size[R]
vector_length[R]

Public Class Methods

new(hash={}) click to toggle source
# File lib/BOAST/Language/DataTypes.rb, line 355
def initialize(hash={})
  @name = hash[:type_name]
  @size = hash[:size]
  @size = 0 if @size.nil?
  @vector_length = hash[:vector_length]
  @vector_length = 1 if @vector_length.nil?
  @total_size = @vector_length*@size
end

Public Instance Methods

decl() click to toggle source
# File lib/BOAST/Language/DataTypes.rb, line 364
def decl
  return "#{@name}" if [C, CL, CUDA].include?( lang )
end