lib/opencl_ruby_ffi/opencl_ruby_ffi_base.rb
# checks if a :cl_int corresponds to an error code and raises the apropriate Error
checks if a :cl_int corresponds to an error code and raises the apropriate Error
checks if a : cl_int corresponds to an error code and raises the apropriate Error
def error_check(errcode)
      return nil if errcode == SUCCESS
      klass = Error::error_class(errcode)
      if klass then
        raise klass::new
      else
        raise Error::new("#{errcode}")
      end
    end
def error_check ( errcode ) return nil if errcode == SUCCESS klass = Error :: error_class ( errcode ) if klass then raise klass :: new else raise Error :: new ( "#{errcode}" ) end end
checks if a :cl_int corresponds to an error code and raises the apropriate Error
checks if a : cl_int corresponds to an error code and raises the apropriate Error
errcode