Skip to content

Commit

Permalink
Modify formatting issues in the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
guojin-yan committed Oct 24, 2023
1 parent 732887c commit 6af235c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 23 deletions.
2 changes: 0 additions & 2 deletions modules/csharp_api/csharp/common/element_type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public OvType(string type) : base (type) { }
};
namespace element
{

/// <summary>
/// Enum to define possible element types
/// <ingroup>ov_element_c#_api</ingroup>
Expand Down Expand Up @@ -115,7 +114,6 @@ public enum Type_t
/// </summary>
u64
};

/// <summary>
/// [struct] Type information storage struct.
/// </summary>
Expand Down
11 changes: 5 additions & 6 deletions modules/csharp_api/csharp/common/version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ public struct Version
/// A null terminated description string
/// </summary>
public string description;

/// <summary>
/// Constructs a Version.
/// </summary>
/// <param name="buildNumber"></param>
/// <param name="description"></param>
public Version(string buildNumber, string description) {
this.buildNumber = buildNumber;
this.description = description;
Expand Down Expand Up @@ -67,9 +71,4 @@ public struct CoreVersionList
/// </summary>
public ulong size;
}





}
2 changes: 0 additions & 2 deletions modules/csharp_api/csharp/core/core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ public CompiledModel compile_model(string model_path)
NativeMethods.ov_core_compile_model_from_file(m_ptr, ref c_model[0], ref c_device[0], 0, ref compiled_model_ptr));
return new CompiledModel(compiled_model_ptr);
}


/// <summary>
/// Reads a model and creates a compiled model from the IR/ONNX/PDPD file.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions modules/csharp_api/csharp/core/layout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace OpenVinoSharp
/// - To set/get model's batch (see `ov::get_batch`/`ov::set_batch') it is required in general to specify 'N' dimension
/// in layout for appropriate inputs
/// </example>
public class Layout
public class Layout : IDisposable
{
/// <summary>
/// [private]Layout class pointer.
Expand Down Expand Up @@ -66,13 +66,13 @@ public Layout(string layout_desc)
/// </summary>
~Layout()
{
dispose();
Dispose();
}

/// <summary>
/// Release unmanaged resources.
/// </summary>
public void dispose()
public void Dispose()
{
if (m_ptr == IntPtr.Zero)
{
Expand Down
3 changes: 2 additions & 1 deletion modules/csharp_api/csharp/core/node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ public Node(IntPtr ptr, NodeType type)
/// <summary>
/// Default deconstruction.
/// </summary>
~Node() {
~Node()
{
Dispose();
}
/// <summary>
Expand Down
7 changes: 4 additions & 3 deletions modules/csharp_api/csharp/core/node_output.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace OpenVinoSharp
/// A handle for one of a node's outputs.
/// </summary>
/// <typeparam name="Node"></typeparam>
public class Output {
public class Output : IDisposable
{
private Node m_node;
private ulong m_index = 0;
/// <summary>
Expand All @@ -28,12 +29,12 @@ public Output(Node node, ulong index)
/// </summary>
~Output()
{
dispose();
Dispose();
}
/// <summary>
/// Release unmanaged resources.
/// </summary>
public void dispose()
public void Dispose()
{
m_node.Dispose();
}
Expand Down
8 changes: 2 additions & 6 deletions modules/csharp_api/csharp/core/partial_shape.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ namespace OpenVinoSharp
/// </remarks>
public class PartialShape
{



/// <summary>
/// PartialShape rank.
/// </summary>
Expand All @@ -34,7 +31,6 @@ public class PartialShape
/// PartialShape dimensions.
/// </summary>
private Dimension[] dimensions;

/// <summary>
/// Constructing partial shape by ov_partial_shape.
/// </summary>
Expand Down Expand Up @@ -77,7 +73,6 @@ public PartialShape(Dimension rank, Dimension[] dimensions)
/// <param name="dimensions">The partial shape dimensions list.</param>
public PartialShape(Dimension rank, List<Dimension> dimensions) : this(rank, dimensions.ToArray())
{

}
/// <summary>
/// Constructing static partial shape by dimensions.
Expand All @@ -98,7 +93,8 @@ public PartialShape(long rank, long[] dimensions)
/// <param name="rank">The partial shape rank.</param>
/// <param name="dimensions">The partial shape dimensions list.</param>
public PartialShape(long rank, List<long> dimensions) : this(rank, dimensions.ToArray())
{}
{
}

/// <summary>
/// Constructing static partial shape by shape.
Expand Down

0 comments on commit 6af235c

Please sign in to comment.