@@ -291,7 +291,7 @@ int RedisDL_TDim_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
291
291
292
292
RDL_Tensor * t = RedisModule_ModuleTypeGetValue (key );
293
293
294
- long long ndims = TF_NumDims ( t -> tensor );
294
+ long long ndims = Tensor_NumDims ( t );
295
295
296
296
RedisModule_CloseKey (key );
297
297
@@ -313,11 +313,11 @@ int RedisDL_TShape_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, i
313
313
314
314
RDL_Tensor * t = RedisModule_ModuleTypeGetValue (key );
315
315
316
- long long ndims = TF_NumDims ( t -> tensor );
316
+ long long ndims = Tensor_NumDims ( t );
317
317
318
318
RedisModule_ReplyWithArray (ctx , ndims );
319
319
for (long long i = 0 ; i < ndims ; i ++ ) {
320
- long long dim = TF_Dim ( t -> tensor , i );
320
+ long long dim = Tensor_Dim ( t , i );
321
321
RedisModule_ReplyWithLongLong (ctx , dim );
322
322
}
323
323
@@ -341,7 +341,7 @@ int RedisDL_TByteSize_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv
341
341
342
342
RDL_Tensor * t = RedisModule_ModuleTypeGetValue (key );
343
343
344
- long long size = TF_TensorByteSize ( t -> tensor );
344
+ long long size = Tensor_ByteSize ( t );
345
345
346
346
RedisModule_CloseKey (key );
347
347
@@ -375,8 +375,8 @@ int RedisDL_TGet_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
375
375
RDL_Tensor * t = RedisModule_ModuleTypeGetValue (key );
376
376
377
377
if (datafmt == REDISDL_DATA_BLOB ) {
378
- long long size = TF_TensorByteSize ( t -> tensor );
379
- char * data = TF_TensorData ( t -> tensor );
378
+ long long size = Tensor_ByteSize ( t );
379
+ char * data = Tensor_Data ( t );
380
380
381
381
int ret = RedisModule_ReplyWithStringBuffer (ctx , data , size );
382
382
@@ -386,14 +386,14 @@ int RedisDL_TGet_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
386
386
}
387
387
}
388
388
else { // datafmt == REDISDL_DATA_VALUES
389
- long long ndims = TF_NumDims ( t -> tensor );
389
+ long long ndims = Tensor_NumDims ( t );
390
390
long long len = 1 ;
391
391
long long i ;
392
392
for (i = 0 ; i < ndims ; i ++ ) {
393
- len *= TF_Dim ( t -> tensor , i );
393
+ len *= Tensor_Dim ( t , i );
394
394
}
395
395
396
- TF_DataType datatype = TF_TensorType ( t -> tensor );
396
+ TF_DataType datatype = Tensor_DataType ( t );
397
397
398
398
RedisModule_ReplyWithArray (ctx , len );
399
399
0 commit comments