<commit_before>module BOAST

  module CRuntime
    include CompiledRuntime

    def fill_library_header
      get_output.puts "#include <inttypes.h>"
      get_output.puts "#define __assume_aligned(lvalueptr, align) lvalueptr = __builtin_assume_aligned (lvalueptr, align)" if @compiler_options[:CC].match("gcc")
    end

    def fill_library_source
      fill_library_header
      @code.rewind
      get_output.write @code.read
    end

    def create_procedure_call_parameters
      params = []
      @procedure.parameters.each { |param|
        if param.dimension then
          params.push( param.name )
        elsif param.direction == :out or param.direction == :inout then
          params.push( "&"+param.name )
        else
          params.push( param.name )
        end
      }
      return params
    end

  end

end<commit_msg>Add sub kernel declaration for C runtime.<commit_after>module BOAST

  module CRuntime
    include CompiledRuntime

    def fill_library_header
      get_output.puts "#include <inttypes.h>"
      get_output.puts "#define __assume_aligned(lvalueptr, align) lvalueptr = __builtin_assume_aligned (lvalueptr, align)" if @compiler_options[:CC].match("gcc")
    end

    def fill_library_source
      fill_library_header
      @kernels.each { |k|
        k.procedure.boast_header
      }
      @code.rewind
      get_output.write @code.read
    end

    def create_procedure_call_parameters
      params = []
      @procedure.parameters.each { |param|
        if param.dimension then
          params.push( param.name )
        elsif param.direction == :out or param.direction == :inout then
          params.push( "&"+param.name )
        else
          params.push( param.name )
        end
      }
      return params
    end

  end

end
{'fraction_non_alphanumeric': 0.08403835307388607, 'fraction_numerical': 0.0, 'mean_word_length': 2.46484375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4486132', 'n_tokens_mistral': 540, 'n_tokens_neox': 522, 'n_words': 122}