Open nbren12 opened 7 years ago
The current sig I am using is
void Redis_push(redisContext * c, void * f, const char* dtype, int * dims,
int ndims, char * KEY);
Now, I just to find a way to wrap the pointer to the redisContext object in fortran. This link has some useful information about dealing with c pointers.
The current fortran API is
call redis_push(redis, 'A', f, 'f4', shape(f))
I cannot figure out anyway to make redis_push handle different types, and avoid manually passing shape(f)
.
I think we can get the API slimmed down to: redis_push(c, key, arr)
through the use of a few interfaces. I'll open a proof of concept PR here shortly.
That'd be great. I don't have much experience with fortran polymorphism. At some point we should probably check for the endianness of the data, and just pass it like '<f8' or '>f8'.
I just opened #13 which address this and the endianness issue.
Send one array
F:
[i,d,f]redis_push(....)
C:
void Redis_push(redisConnnection * c, void * f, int dtype, int * dims, int ndims, char * KEY);
PUBLISH subscription_key KEY