Transferring loads of array variables from Stack to Heap

This commit is contained in:
Hombre
2010-12-27 12:47:45 +01:00
parent 69284246b1
commit 6152b5d9dd
26 changed files with 192 additions and 73 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;