Skip to content

Commit

Permalink
Fix ordering of APIs. (microsoft#3951)
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavsharma authored May 15, 2020
1 parent 9ef3768 commit 47ae969
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions csharp/src/Microsoft.ML.OnnxRuntime/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public struct OrtApiBase
public IntPtr GetVersionString;
};

// NOTE: The order of the APIs in this struct should match exactly that in
// OrtApi ort_api_1_to_3 (onnxruntime_c_api.cc)
[StructLayout(LayoutKind.Sequential)]
public struct OrtApi
{
Expand All @@ -38,8 +40,8 @@ public struct OrtApi
public IntPtr EnableCpuMemArena;
public IntPtr DisableCpuMemArena;
public IntPtr SetSessionLogId;
public IntPtr SetSessionLogSeverityLevel;
public IntPtr SetSessionLogVerbosityLevel;
public IntPtr SetSessionLogSeverityLevel;
public IntPtr SetSessionGraphOptimizationLevel;
public IntPtr SetIntraOpNumThreads;
public IntPtr SetInterOpNumThreads;
Expand All @@ -59,8 +61,8 @@ public struct OrtApi
public IntPtr SessionGetOutputName;
public IntPtr SessionGetOverridableInitializerName;
public IntPtr CreateRunOptions;
public IntPtr RunOptionsSetRunLogSeverityLevel;
public IntPtr RunOptionsSetRunLogVerbosityLevel;
public IntPtr RunOptionsSetRunLogSeverityLevel;
public IntPtr RunOptionsSetRunTag;
public IntPtr RunOptionsGetRunLogVerbosityLevel;
public IntPtr RunOptionsGetRunLogSeverityLevel;
Expand Down

0 comments on commit 47ae969

Please sign in to comment.