internal static void GetTypeAndWidth(Tensors.TensorElementType elemType, out Type type, out int width) { TensorElementTypeInfo result = TensorBase.GetElementTypeInfo(elemType); if (result != null) { type = result.TensorType; width = result.TypeSize; } else { throw new ArgumentException("Unable to get information for type: " + elemType.ToString()); } }
internal static void GetTypeAndWidth(Tensors.TensorElementType elemType, out Type type, out int width) { TensorElementTypeInfo result = TensorBase.GetElementTypeInfo(elemType); if (result != null) { type = result.TensorType; width = result.TypeSize; } else { type = null; width = 0; } }
public static bool GetTypeAndWidth(TensorElementType elemType, out Type type, out int width) { bool result = true; TensorElementTypeInfo typeInfo = TensorBase.GetElementTypeInfo(elemType); if (typeInfo != null) { type = typeInfo.TensorType; width = typeInfo.TypeSize; } else { type = null; width = 0; result = false; } return(result); }