Compute blockwise sums of a vector x of length n. More...
#include "../include/mycuda.h"Go to the source code of this file.
Functions | |
| __device__ void | reduce1_dev (float *x, int n) |
__device__ function that does actual reduction More... | |
| __global__ void | reduce1 (float *xsum, float *x, int stride) |
| Reduction kernel. More... | |
| int | main () |
Variables | |
| const int | blocksize = 256 |
Compute blockwise sums of a vector x of length n.
Definition in file reduce1.cu.
| int main | ( | void | ) |
Definition at line 85 of file reduce1.cu.
| __global__ void reduce1 | ( | float * | xsum, |
| float * | x, | ||
| int | stride | ||
| ) |
Reduction kernel.
Given an M x N array, return the column sums.
Definition at line 65 of file reduce1.cu.
| __device__ void reduce1_dev | ( | float * | x, |
| int | n | ||
| ) |
__device__ function that does actual reduction
Definition at line 25 of file reduce1.cu.
| const int blocksize = 256 |
Definition at line 8 of file reduce1.cu.
1.8.4