lib/tensorflow/ffi.rb in tensorflow-0.1.2 vs lib/tensorflow/ffi.rb in tensorflow-0.2.0

- old
+ new

@@ -34,15 +34,20 @@ # https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/tf_tensor.h attach_function :TF_NewTensor, %i[int pointer int pointer size_t pointer pointer], :pointer attach_function :TF_DeleteTensor, %i[pointer], :void attach_function :TF_TensorData, %i[pointer], :pointer attach_function :TF_TensorByteSize, %i[pointer], :size_t - attach_function :TF_StringEncode, %i[pointer size_t pointer size_t pointer], :size_t - attach_function :TF_StringDecode, %i[pointer size_t pointer pointer pointer], :size_t - attach_function :TF_StringEncodedSize, %i[size_t], :size_t + # https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/tf_tstring.h + attach_function :TF_StringInit, %i[pointer], :void + attach_function :TF_StringCopy, %i[pointer pointer size_t], :void + attach_function :TF_StringGetDataPointer, %i[pointer], :string + attach_function :TF_StringGetSize, %i[pointer], :size_t + # https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/eager/c_api.h + ContextDevicePlacementPolicy = enum(:explicit, :warn, :silent, :silent_for_int32) + attach_function :TFE_NewContextOptions, %i[], :pointer attach_function :TFE_ContextOptionsSetAsync, %i[pointer char], :void attach_function :TFE_DeleteContextOptions, %i[pointer], :void attach_function :TFE_NewContext, %i[pointer pointer], :pointer attach_function :TFE_DeleteContext, %i[pointer], :void @@ -73,7 +78,12 @@ attach_function :TFE_OpSetAttrIntList, %i[pointer string pointer int], :void attach_function :TFE_OpSetAttrFloatList, %i[pointer string pointer int], :void attach_function :TFE_OpSetAttrTypeList, %i[pointer string pointer int], :void attach_function :TFE_OpSetAttrShapeList, %i[pointer string pointer pointer int pointer], :void attach_function :TFE_Execute, %i[pointer pointer pointer pointer], :pointer + attach_function :TFE_ContextHasFunction, %i[pointer string], :uchar + attach_function :TFE_ContextEnableRunMetadata, %i[pointer], :void + attach_function :TFE_ContextDisableRunMetadata, %i[pointer], :void + attach_function :TFE_ContextStartStep, %i[pointer], :void + attach_function :TFE_ContextEndStep, %i[pointer], :void end end