Transferring loads of array variables from Stack to Heap

This commit is contained in:
Hombre
2011-01-01 03:28:27 +01:00
parent 5ee87be11b
commit 9fa432880c
26 changed files with 190 additions and 72 deletions

View File

@@ -25,15 +25,21 @@
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
static float dirwt[0x10000];
static float *dirwt;
static void __attribute__((constructor)) setup_dirwt()
{
dirwt = new float[0x10000];
//set up directional weight function
for (int i=0; i<0x10000; i++)
dirwt[i] = 1.0/SQR(1.0+i);
}
static void __attribute__((destructor)) cleanup_dirwt()
{
delete [] dirwt;
}
void RawImageSource::fast_demo(int winx, int winy, int winw, int winh) {
//int winx=0, winy=0;
//int winw=W, winh=H;