MEMORY ALLOCATION TO 2 DIMENSIONAL ARRAY

HI, I AM WORKING WITH A MATRIX OF ORDER 15 LAC X 15 LAC. MY SYSTEM HAVING AMEMORY 2GBDDR2. PROCESSOR OF 2.1 GHZ. NOW I MADE A MEMORY OF 21000X21000 BY A METHOD
float **K_GLOBAL;
K_global=new float *[21600];
for(int ii=0;ii<21600;ii++)
K_global[ii]=new float[21600];
if i enter a amount greater than 22000, it hangs my program during run.
so can u give me a nice idea to extend the order of matrix with my limited resource than this. my matrix variables are float and i have to achieve the maximum matrix to complete my work.
You can't do this with that amount of RAM. A 22000^2 matrix requires ~1.8 GiB of memory even assuming maximum space efficiency. Either buy more RAM, or move the structure (or part of it) to a file.
closed account (EzwRko23)
Or use a sparse matrix, if most of the values are 0.0. Keep only non-zero elements.
xore box idea may work for me, in my matrix its a dioganal matrix having values in diagonal only. that means a band width of 90 values , all other values are zero. so how can i neglect those values wen buildin those values since i dont have the use of those values
xore box idea may work for me, in my matrix its a dioganal matrix having values in diagonal only. that means a band width of 90 values , all other values are zero. so how can i neglect those values wen buildin those values since i dont have the use of those values
in my matrix its a dioganal matrix having values in diagonal only
Then it's not a matrix at all. It's just an array. If you're only going to need elements array[x][x], the extra dimension is completely unnecessary. Just allocate a 22000 element 1D array.
Topic archived. No new replies allowed.