1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef _HW_TOOLS_H
#define _HW_TOOLS_H
# ifdef __cplusplus
extern "C" {
# endif
/**
* This function computes number of blocks in grid for given number of
* items.
*
* @param items is a number of items to process
* @param block_size is a number of threads per block (BLOCK_SIZE normally)
* @param increment is an optional parameter in which amount of additional items added to create a grid will be returned
* @result the grid size
**/
int hw_calc_blocks(int items, int block_size, int *increment);
# ifdef __cplusplus
}
# endif
#endif /* _HW_TOOLS_H */
|