Document for C API
longcw
apaszke
Thank you for your reply. I have found it in the source code.
longcw
float *int input_data = THFloatTensor_data(input)
alexis-jacq
ncullen93
<SCODE>long offset = input->storageOffset+i*input->stride[0]+j*input->stride[1];
float val = THFloatStorage_get(input->storage, offset);

<ECODE>
Frank_Lee
apaszke
fmassa
lupoglaz
alexis-jacq
apaszke
Ah ok ! thanks! Now I’m starting to understand better how you create a python library with C code. Also, this link is really helpfull: I don’t know if somewhere else you provide the list of all the “torch.x” available functions.
alexis-jacq
apaszke
Wow. How did I miss that
alexis-jacq
I think the doc for the C api would be nice, there’s so much super cool functionality that gets a bit obscured by the macro concatenation in the C source and the source being scattered across files plus navigation tools getting confused by the macros (I really like the design of the API though and how the macros are used, it was clearly designed with maximum simplicity in mind which is awesome). Also incremental updates in release notes on what’s new in the C API would help keeping track of changes. I could also see how added overhead of something like this might be an opportunity cost. Just an idea.
Andrei_Pokrovsky
jinserk