class Ikra::Symbolic::Input

Specifies an input parameter for a parallel section. A parameter might be expanded to multiple parameters in the generated CUDA code to avoid passing arrays etc.

Attributes

command[R]
pattern[R]

Returns the access pattern of this input, e.g., `:tid` (single element, identified by thread ID) or `:entire` (access to entire array is necessary).

Public Class Methods

new(pattern:) click to toggle source
# File lib/symbolic/input.rb, line 12
def initialize(pattern:)
    # Currently supported: :tid, :entire
    @pattern = pattern
end

Public Instance Methods

==(other) click to toggle source
# File lib/symbolic/input.rb, line 17
def ==(other)
    return self.class == other.class &&
        self.pattern == other.pattern &&
        self.command == other.command
end
accept(visitor) click to toggle source
# File lib/symbolic/input_visitor.rb, line 7
def accept(visitor)
    visitor.visit_input(self, pattern: pattern)
end
eql?(other) click to toggle source
# File lib/symbolic/input.rb, line 27
def eql?(other)
    return self == other
end
get_parameters(**kwargs) click to toggle source
# File lib/types/inference/input_inference.rb, line 4
def get_parameters(**kwargs)
    raise NotImplementedError.new
end
hash() click to toggle source
# File lib/symbolic/input.rb, line 23
def hash
    return (pattern.hash + command.hash) % 7656781
end
translate_input(**kwargs) click to toggle source
# File lib/translator/input_translator.rb, line 4
def translate_input(**kwargs)
    raise NotImplementedError.new
end