Sha256: 0f074b4d94d09761b6d8e9b1b7bcccf1ebf9d4c9a1498d6b5068689515ec0a57

Contents?: true

Size: 776 Bytes

Versions: 23

Compression:

Stored size: 776 Bytes

Contents

#include <stdio.h>

// __device__ function
__device__ void func()
{
    short* array0 = (short*)array;
    float* array1 = (float*)&array0[127];
}

/* __global__ function */
__global__ static void reduction(const float* __restrict__ input, float *output, clock_t *timer)
{
    // __shared__ float shared[2 * blockDim.x];
    extern __shared__ float shared[];

    const int tid = threadIdx.x;
    const int bid = blockIdx.x;
    
    if (threadIdx.x == 0) {
        __threadfence();
    }

    // Perform reduction to find minimum.
    for (int d = blockDim.x; d > 0; d /= 2)
    {
        __syncthreads();
    }
}

int main(int argc, char **argv)
{
    dim3 dimBlock(8, 8, 1);

    timedReduction<<<dimBlock, 256, 256, 0>>>(dinput, doutput, dtimer);
    cudaDeviceReset();
}

Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.6.3 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.6.2 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.6.1 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.6.0 vendor/pygments-main/tests/examplefiles/test.cu
mortar-pygments.rb-0.5.7 vendor/pygments-main/tests/examplefiles/test.cu
mortar-pygments.rb-0.5.6 vendor/pygments-main/tests/examplefiles/test.cu
mortar-pygments.rb-0.5.5 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-jruby-0.5.4.2 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-jruby-0.5.4.1 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-jruby-0.5.4 vendor/pygments-main/tests/examplefiles/test.cu
gitlab-pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.5.4 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.5.2 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.5.1 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.5.0 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.4.2 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.4.1 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.3.7 vendor/pygments-main/tests/examplefiles/test.cu
pygments.rb-0.3.6 vendor/pygments-main/tests/examplefiles/test.cu