Skip to content

Commit 027e3c7

Browse files
author
DvirDukhan
committed
format
1 parent c4beee6 commit 027e3c7

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/backends/backends.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ int RAI_LoadBackend_TensorFlow(RedisModuleCtx *ctx, const char *path) {
179179
goto error;
180180
}
181181

182-
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
183-
(unsigned long)dlsym(handle, "RAI_ModelSerializeTF"));
182+
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))((
183+
unsigned long)dlsym(handle, "RAI_ModelSerializeTF"));
184184
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeTF", "TF", path)) {
185185
goto error;
186186
}
@@ -244,8 +244,9 @@ int RAI_LoadBackend_TFLite(RedisModuleCtx *ctx, const char *path) {
244244
goto error;
245245
}
246246

247-
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
248-
unsigned long)dlsym(handle, "RAI_ModelSerializeTFLite");
247+
backend.model_serialize =
248+
(int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(unsigned long)dlsym(
249+
handle, "RAI_ModelSerializeTFLite");
249250
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeTFLite", "TFLite",
250251
path)) {
251252
goto error;
@@ -311,8 +312,9 @@ int RAI_LoadBackend_Torch(RedisModuleCtx *ctx, const char *path) {
311312
goto error;
312313
}
313314

314-
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
315-
unsigned long)dlsym(handle, "RAI_ModelSerializeTorch");
315+
backend.model_serialize =
316+
(int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(unsigned long)dlsym(
317+
handle, "RAI_ModelSerializeTorch");
316318
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeTorch", "TORCH",
317319
path)) {
318320
goto error;
@@ -331,8 +333,8 @@ int RAI_LoadBackend_Torch(RedisModuleCtx *ctx, const char *path) {
331333
goto error;
332334
}
333335

334-
backend.script_run = (int (*)(RAI_Script *, const char *, RAI_ExecutionCtx *, RAI_Error *))(
335-
unsigned long)dlsym(handle, "RAI_ScriptRunTorch");
336+
backend.script_run = (int (*)(RAI_Script *, const char *, RAI_ExecutionCtx *,
337+
RAI_Error *))(unsigned long)dlsym(handle, "RAI_ScriptRunTorch");
336338
if (!_ValidateFuncExists(ctx, backend.script_run, "RAI_ScriptRunTorch", "TORCH", path)) {
337339
goto error;
338340
}
@@ -397,8 +399,9 @@ int RAI_LoadBackend_ONNXRuntime(RedisModuleCtx *ctx, const char *path) {
397399
goto error;
398400
}
399401

400-
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
401-
unsigned long)dlsym(handle, "RAI_ModelSerializeORT");
402+
backend.model_serialize =
403+
(int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(unsigned long)dlsym(
404+
handle, "RAI_ModelSerializeORT");
402405
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeORT", "ONNX", path)) {
403406
goto error;
404407
}

0 commit comments

Comments
 (0)