I am very puzzled, I have a pointer to an array of unsigned 64-bit integers. Each 64-bit integer actually represents 16-bit integers, so it should be split into a 16-bit array, for example, for example:
36348941 should splash out as:
0,0,554,41997
However, in C, I do not see a methodology for executing this method. I understand that C has great potential in memory management, I would like that I would not have to iterate over the data to perform this action, but just change how the data is interpreted in memory, allocating the processor and de-allocating memory will be a lot of time for my programs (it should work as quickly as possible - preferably less than 20 milliseconds).
If I just put:
arg1 = *(unsigned short (*))(&arg2);
I find that the data has truncated bits, so only one value is spilled out per 64-bit integer, which with the case above will be 41997.
This is only the first part of another complex problem for the application, the next 16-bit array must be transferred to a three-dimensional array, while I can get this program to compile by doing:
const int I = 4;
const int J = 256;
const int K = 256;
arg1 = *(unsigned short (*)[I][J][K])(&arg2);
But it does not give me any data, I saw this work in other languages, but they redistribute the memory, which thus takes a lot of time, and it is desirable that all this happens in the processor, there is no need for memory allocation, as this is just requiring so that the display of bits in memory is different, not the data itself.
. , , , , , , C DLL , , , .
, , .
C , .