Good morning,
I am implementing some functions in C to speed up part of my code, however when trying to use TH functions I have few problems.
I am trying to create a 2D tensor using :

THFloatTensor * IoU = THFloatTensor_newWithSize2d(nb1,nb2);
Which does’nt raise any errors. But when compiling the functions :


THTensor_get2d and THTensor_set2d
give me warnings, and during execution the set function give the error :


undefined symbol: THTensor_set2d

But those functions seems to be well defined in https://github.com/pytorch/pytorch/blob/master/aten/src/TH/generic/THTensor.h 9
Any idea ?
Also when working with CPU Tensors, should I include

#include <TH/TH.h>

To be able to use

THTensor_get2d

and

THTensor_set2d

?
I am a bit lost about how to manipulate and create tensors  in C. I was creating them in python before and manipulated them in C as 1D arrays.