class Ikra::Translator::CommandTranslator::WhileLoopKernelLauncher
Attributes
before_loop[R]
condition[R]
post_iteration[R]
Public Class Methods
new( kernel_builder:, condition:, before_loop: "", post_iteration: "")
click to toggle source
Calls superclass method
Ikra::Translator::CommandTranslator::KernelLauncher::new
# File lib/translator/kernel_launcher/while_loop_kernel_launcher.rb, line 5 def initialize( kernel_builder:, condition:, before_loop: "", post_iteration: "") super(kernel_builder) @condition = condition @before_loop = before_loop @post_iteration = post_iteration end
Public Instance Methods
build_kernel_launcher()
click to toggle source
Calls superclass method
Ikra::Translator::CommandTranslator::KernelLauncher#build_kernel_launcher
# File lib/translator/kernel_launcher/while_loop_kernel_launcher.rb, line 21 def build_kernel_launcher Log.info("Building for-loop kernel launcher") assert_ready_to_build result = "" result = result + before_loop + "\n" result = result + "while (#{condition}) {\n" result = result + super result = result + "\n" + post_iteration result = result + "\n}\n" return result end