2020-04-24 13:06:47 -07:00
|
|
|
// Various constants for the sizes of groups and tiles.
|
|
|
|
|
|
|
|
// Much of this will be made dynamic in various ways, but for now it's easiest
|
|
|
|
// to hardcode and keep all in one place.
|
|
|
|
|
|
|
|
// TODO: compute all these
|
|
|
|
|
|
|
|
#define WIDTH_IN_TILES 128
|
2020-06-02 17:10:20 -07:00
|
|
|
#define HEIGHT_IN_TILES 96
|
2020-04-24 13:06:47 -07:00
|
|
|
#define TILE_WIDTH_PX 16
|
|
|
|
#define TILE_HEIGHT_PX 16
|
|
|
|
|
2020-08-29 15:02:45 +02:00
|
|
|
// TODO: make the image size dynamic.
|
|
|
|
#define IMAGE_WIDTH (WIDTH_IN_TILES*TILE_WIDTH_PX)
|
|
|
|
#define IMAGE_HEIGHT (HEIGHT_IN_TILES*TILE_HEIGHT_PX)
|
2020-04-28 22:25:57 -07:00
|
|
|
|
2020-08-29 15:02:45 +02:00
|
|
|
#define PTCL_INITIAL_ALLOC 1024
|
2020-05-13 15:35:19 -07:00
|
|
|
|
|
|
|
// Stuff for new algorithm follows; some of the above should get
|
|
|
|
// deleted.
|
|
|
|
|
|
|
|
// These should probably be renamed and/or reworked. In the binning
|
|
|
|
// kernel, they represent the number of bins. Also, the workgroup size
|
|
|
|
// of that kernel is equal to the number of bins, but should probably
|
|
|
|
// be more flexible (it's 512 in the K&L paper).
|
|
|
|
#define N_TILE_X 16
|
|
|
|
#define N_TILE_Y 16
|
|
|
|
#define N_TILE (N_TILE_X * N_TILE_Y)
|
2020-05-19 08:21:09 -07:00
|
|
|
#define LG_N_TILE 8
|
2020-05-13 15:35:19 -07:00
|
|
|
#define N_SLICE (N_TILE / 32)
|