Skip to content

Commit 65ba8e0

Browse files
author
DvirDukhan
committed
clang13 format
1 parent 9713db3 commit 65ba8e0

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/backends/backends.c

Lines changed: 10 additions & 13 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,9 +244,8 @@ int RAI_LoadBackend_TFLite(RedisModuleCtx *ctx, const char *path) {
244244
goto error;
245245
}
246246

247-
backend.model_serialize =
248-
(int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(unsigned long)dlsym(
249-
handle, "RAI_ModelSerializeTFLite");
247+
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
248+
unsigned long)dlsym(handle, "RAI_ModelSerializeTFLite");
250249
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeTFLite", "TFLite",
251250
path)) {
252251
goto error;
@@ -312,9 +311,8 @@ int RAI_LoadBackend_Torch(RedisModuleCtx *ctx, const char *path) {
312311
goto error;
313312
}
314313

315-
backend.model_serialize =
316-
(int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(unsigned long)dlsym(
317-
handle, "RAI_ModelSerializeTorch");
314+
backend.model_serialize = (int (*)(RAI_Model *, char **, size_t *, RAI_Error *))(
315+
unsigned long)dlsym(handle, "RAI_ModelSerializeTorch");
318316
if (!_ValidateFuncExists(ctx, backend.model_serialize, "RAI_ModelSerializeTorch", "TORCH",
319317
path)) {
320318
goto error;
@@ -333,8 +331,8 @@ int RAI_LoadBackend_Torch(RedisModuleCtx *ctx, const char *path) {
333331
goto error;
334332
}
335333

336-
backend.script_run = (int (*)(RAI_Script *, const char *, RAI_ExecutionCtx *,
337-
RAI_Error *))(unsigned long)dlsym(handle, "RAI_ScriptRunTorch");
334+
backend.script_run = (int (*)(RAI_Script *, const char *, RAI_ExecutionCtx *, RAI_Error *))(
335+
unsigned long)dlsym(handle, "RAI_ScriptRunTorch");
338336
if (!_ValidateFuncExists(ctx, backend.script_run, "RAI_ScriptRunTorch", "TORCH", path)) {
339337
goto error;
340338
}
@@ -399,9 +397,8 @@ int RAI_LoadBackend_ONNXRuntime(RedisModuleCtx *ctx, const char *path) {
399397
goto error;
400398
}
401399

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

0 commit comments

Comments
 (0)