sin.cu 190 Bytes
Newer Older
yongshk's avatar
yongshk committed
1
2
3
4
5
6
extern "C" __global__ void sin_kernel(float *out, const float *inp, int numel) {
    int i = blockIdx.x * blockDim.x + threadIdx.x;
    if (i < numel) {
        out[i] = sin(inp[i]);
    }
}