This sample demonstrates code for performing prefix scans using CUDA. More...
Go to the source code of this file.
Functions | |
| template<typename T > | |
| void | show (T *x, T *x_gold, int first, int n) |
| Utility function for showing some test results. More... | |
| template<typename T > | |
| int | check (T *x, T *x_gold, int n, char *str) |
| Verify that host and device results are identical. More... | |
| int | main () |
| Perform blockwise prefix scan. More... | |
This sample demonstrates code for performing prefix scans using CUDA.
Definition in file prefixScan.cu.
| int check | ( | T * | x, |
| T * | x_gold, | ||
| int | n, | ||
| char * | str | ||
| ) |
Verify that host and device results are identical.
| x | (in) Vector of CUDA results |
| x_gold | (in) Vector of host results |
| n | (in) Number of elements to show |
| str | (in) Label indicating vector being tested |
Definition at line 30 of file prefixScan.cu.
| int main | ( | void | ) |
Perform blockwise prefix scan.
Definition at line 55 of file prefixScan.cu.
| void show | ( | T * | x, |
| T * | x_gold, | ||
| int | first, | ||
| int | n | ||
| ) |
Utility function for showing some test results.
| x | (in) Vector of CUDA results |
| x_gold | (in) Vector of host results |
| first | (in) Index of first element to show |
| n | (in) Number of elements to show |
Definition at line 14 of file prefixScan.cu.
1.8.4