Class: Oboe_metal::Context
- Inherits:
-
Object
- Object
- Oboe_metal::Context
- Defined in:
- lib/oboe_metal.rb,
lib/joboe_metal.rb
Class Attribute Summary collapse
-
.layer_op ⇒ Object
Returns the value of attribute layer_op.
Class Method Summary collapse
- .clear ⇒ Object
- .get ⇒ Object
- .log(layer, label, options = {}, with_backtrace = false) ⇒ Object
- .toString ⇒ Object
- .tracing_layer_op?(operation) ⇒ Boolean
Class Attribute Details
.layer_op ⇒ Object
Returns the value of attribute layer_op.
9 10 11 |
# File 'lib/oboe_metal.rb', line 9 def layer_op @layer_op end |
Class Method Details
.clear ⇒ Object
46 47 48 |
# File 'lib/joboe_metal.rb', line 46 def clear clearMetadata end |
.get ⇒ Object
50 51 52 |
# File 'lib/joboe_metal.rb', line 50 def get getMetadata end |
.log(layer, label, options = {}, with_backtrace = false) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/oboe_metal.rb', line 11 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 |
.toString ⇒ Object
42 43 44 |
# File 'lib/joboe_metal.rb', line 42 def toString md = getMetadata.toString end |
.tracing_layer_op?(operation) ⇒ Boolean
25 26 27 28 29 30 31 |
# File 'lib/oboe_metal.rb', line 25 def tracing_layer_op?(operation) if operation.is_a?(Array) return operation.include?(@layer_op) else return @layer_op == operation end end |