コード例 #1
0
ファイル: uarray2b.c プロジェクト: lyra833/Stufts
/* New blocked 2d array: blocksize as large as possible provided block occupies
 * at most 64KB (if possible) */
extern T UArray2b_new_64K_block(int width, int height, int size) 
{
        assert(width > 0 && height > 0);
        assert(size > 0);
        
        /* Max blocksize possible */
        int blocksize = sqrt(SIXTY_FOUR_KB/size);
        
        return UArray2b_new(width, height, size, blocksize);
}
コード例 #2
0
ファイル: uarray2b.c プロジェクト: annarichardson/Tufts-Class
extern T UArray2b_new_64K_block(int width, int height, int size)
{
        int blocksize;
        if (size < 64000)       
                blocksize = sqrt(64000 / size);
        else
                blocksize = 1;
        T array2b = UArray2b_new(width, height, size, blocksize);
        return array2b;
}
コード例 #3
0
ファイル: uarray2b.c プロジェクト: iancross/projects
T UArray2b_new_64K_block(int width, int height, int size) {
  //create blocks of up to 64KB
  int blocksize = sqrt(65536/size);
  return UArray2b_new(width, height, size, blocksize);
}