I have been trying to use the texture memory to do linear interpolation for me but I have some problems with bidding the memory and I am hoping someone can give me a hint or a pointer to a sample I can look at.
I have a 1024x1024 array of data and a 1024 vector of coefficients when this data was found. This coefficients are the same among columns.
The problem I run into is the fact that this coefficients are not linearly spaced… so I am not sure how should I go about binding the data to the texture memory. All samples I have seen so far assume that the data is linearly spaced.
h_Data is the actual data I receive.
h_w are the coefficients where this data was captured
h_newW is a linearly spaced vector and I need to get the Data at this points.
This is similar to what the interp1() matlab function will do. (interp1(w,Data,newW,‘linear’);)
h_Data = 122.354492187500;
h_Data = 269.743164062500;
h_Data = 101.148437500000;
h_Data = 249.022460937500;
h_Data = 109.553710937500;
h_w = 2.01686769546180;
h_w = 2.01646257693969;
h_w = 2.01605764045000;
h_w = 2.01565288595646;
h_w = 2.01524831342281;
h_newW = 2.01686769546180;
h_newW = 2.01654874030760;
h_newW = 2.01622978515341;
h_newW = 2.01591082999921;
h_newW = 2.01559187484501;
Can texture memory be bind with non linear coefficients? (and then unbind using linear coefficients)
Any hit/comment/idea would be great appreciated!
Thanks in advance