{
internal static partial class Libraries
{
- public const string Nnstreamer = "libcapi-nnstreamer.so.0";
+ public const string Nnstreamer = "libcapi-nnstreamer.so.1";
}
internal static partial class Pipeline
/// Creates a TensorsData instance with handle which is given by TensorsInfo.
/// </summary>
/// <param name="handle">The handle of tensors data.</param>
- /// <param name="info">The handle of tensors info. (Default: null)</param>
+ /// <param name="info">The handle of tensors info.</param>
/// <param name="isFetch">The boolean value for fetching the data (Default: false)</param>
/// <param name="hasOwnership">The boolean value for automatic disposal (Default: true)</param>
/// <since_tizen> 6 </since_tizen>
/* Set internal object */
_handle = handle;
- _tensorsInfo = info;
+ /* Because developers can change the TensorsInfo object, it should be stored as a deep-copied instance. */
+ _tensorsInfo = info.Clone();
/* Set count */
int count = 0;
if (disposing)
{
// release managed object
+ _tensorsInfo.Dispose();
+ _tensorsInfo = null;
}
// release unmanaged objects
for (int i = 0; i < this.Count; ++i)
{
- // Name
- if (string.Compare(this.GetTensorName(i), other.GetTensorName(i)) != 0)
- return false;
-
// Type
if (this.GetTensorType(i) != other.GetTensorType(i))
return false;
}
/// <summary>
+ /// Create a new TensorsInfo object cloned from the current tensors information.
+ /// </summary>
+ /// <returns>Hard-copied TensorsInfo object</returns>
+ /// <since_tizen> 9 </since_tizen>
+ internal TensorsInfo Clone()
+ {
+ TensorsInfo retInfo = null;
+ retInfo = new TensorsInfo();
+
+ foreach (TensorInfo t in _infoList) {
+ retInfo.AddTensorInfo(t.Name, t.Type, t.Dimension);
+ }
+
+ return retInfo;
+ }
+
+ /// <summary>
/// Make TensorsInfo object from Native handle
/// </summary>
/// <param name="handle">Handle of TensorsInfo object</param>