Skip to content

Commit

Permalink
Oga global functions should be inline (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 authored Jul 16, 2024
1 parent 333052b commit 940bc10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ort_genai.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,19 +332,19 @@ struct OgaHandle {
// Global Oga functions
namespace Oga {

void SetLogBool(const char* name, bool value) {
inline void SetLogBool(const char* name, bool value) {
OgaCheckResult(OgaSetLogBool(name, value));
}

void SetLogString(const char* name, const char* value) {
inline void SetLogString(const char* name, const char* value) {
OgaCheckResult(OgaSetLogString(name, value));
}

void SetCurrentGpuDeviceId(int device_id) {
inline void SetCurrentGpuDeviceId(int device_id) {
OgaCheckResult(OgaSetCurrentGpuDeviceId(device_id));
}

int GetCurrentGpuDeviceId() {
inline int GetCurrentGpuDeviceId() {
int device_id;
OgaCheckResult(OgaGetCurrentGpuDeviceId(&device_id));
return device_id;
Expand Down

0 comments on commit 940bc10

Please sign in to comment.