summaryrefslogtreecommitdiff
path: root/Tests/Cuda/ObjectLibrary/Conflicts/static.cu
blob: 586e8c62b74fd8e1a3911dd440e95c9f1f96d766 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>

int __host__ cu2_sq_func(int x)
{
  cudaError_t err;
  int nDevices = 0;
  err = cudaGetDeviceCount(&nDevices);
  if (err != cudaSuccess) {
    std::cerr << "nDevices: " << nDevices << std::endl;
    std::cerr << "err: " << err << std::endl;
    return 1;
  }
  return x * x;
}