Class: Oboe_metal::Context
- Inherits:
-
Object
- Object
- Oboe_metal::Context
- Defined in:
- lib/oboe_metal.rb
Class Attribute Summary collapse
-
.layer_op ⇒ Object
Returns the value of attribute layer_op.
Class Method Summary collapse
- .log(layer, label, options = {}, with_backtrace = false) ⇒ Object
- .tracing_layer_op?(operation) ⇒ Boolean
Class Attribute Details
.layer_op ⇒ Object
Returns the value of attribute layer_op.
7 8 9 |
# File 'lib/oboe_metal.rb', line 7 def layer_op @layer_op end |
Class Method Details
.log(layer, label, options = {}, with_backtrace = false) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/oboe_metal.rb', line 9 def log(layer, label, = {}, with_backtrace = false) evt = Oboe::Context.createEvent() evt.addInfo("Layer", layer.to_s) evt.addInfo("Label", label.to_s) .each_pair do |k, v| evt.addInfo(k.to_s, v.to_s) end evt.addInfo("Backtrace", Oboe::API.backtrace) if with_backtrace Oboe.reporter.sendReport(evt) end |
.tracing_layer_op?(operation) ⇒ Boolean
23 24 25 26 27 28 29 |
# File 'lib/oboe_metal.rb', line 23 def tracing_layer_op?(operation) if operation.is_a?(Array) return operation.include?(@layer_op) else return @layer_op == operation end end |