blob: 9540e862de60b09e43770e80878477f8ae5370f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <string>
#include <cuda.h>
int dynamic_base_func(int);
int __host__ cuda_dynamic_host_func(int x)
{
return dynamic_base_func(x);
}
static
__global__
void DetermineIfValidCudaDevice()
{
}
void cuda_dynamic_lib_func(std::string& contents )
{
DetermineIfValidCudaDevice <<<1,1>>> ();
if(cudaSuccess == cudaGetLastError())
{
contents = "ran a cuda kernel";
}
else
{
contents = "cant run a cuda kernel";
}
}
|