Sha256: 12ded421ab74a63d3fe20d2df91bc4dc0f349b4cf224ea5b2d8353c2e017d9ae
Contents?: true
Size: 772 Bytes
Versions: 20
Compression:
Stored size: 772 Bytes
Contents
require_relative '../cuda' module Cumo::CUDA class CompileError < StandardError def initialize(msg, source, name, options) @msg = msg @source = source @name = name @options = options end def message @msg end def to_s @msg end def dump(io) lines = @source.split("\n") digits = Math.log10(lines.size).floor + 1 linum_fmt = "%0#{digits}d " io.puts("NVRTC compilation error: #{@msg}") io.puts("-----") io.puts("Name: #{@name}") io.puts("Options: #{@options.join(' ')}") io.puts("CUDA source:") lines.each.with_index do |line, i| io.puts(linum_fmt.sprintf(i + 1) << line.rstrip) end io.puts("-----") io.flush end end end
Version data entries
20 entries across 20 versions & 1 rubygems