first support for integration with NVCC/CUDART API
This commit is contained in:
15
examples_cuda/mandelbrot_tasks3d/_cuobj/Makefile
Normal file
15
examples_cuda/mandelbrot_tasks3d/_cuobj/Makefile
Normal file
@@ -0,0 +1,15 @@
|
||||
FILE=mandel
|
||||
|
||||
LIB=lib$(FILE)_cudart.a
|
||||
all: $(LIB)
|
||||
|
||||
|
||||
$(LIB) : $(FILE).cu
|
||||
nvcc -dc $(FILE).cu -arch=sm_35 -dryrun 2>&1 | sed 's/\#\$$//g'|awk '{ if ($$1 == "cicc") print "cp ../__kernels.ptx " $$NF; else print $0 }' > run.sh
|
||||
sh run.sh
|
||||
nvcc -dlink -o $(FILE)_dlink.o $(FILE).o -lcudadevrt -arch=sm_35
|
||||
nvcc $(FILE).o $(FILE)_dlink.o --lib -o lib$(FILE)_cudart.a
|
||||
|
||||
clean:
|
||||
/bin/rm -f *.o *.a run.sh
|
||||
|
||||
22
examples_cuda/mandelbrot_tasks3d/_cuobj/mandel.cu
Normal file
22
examples_cuda/mandelbrot_tasks3d/_cuobj/mandel.cu
Normal file
@@ -0,0 +1,22 @@
|
||||
extern "C" static inline int __device__ mandel___vyfvyfvyi_(float c_re, float c_im, int count) {}
|
||||
extern "C" void __global__ mandelbrot_scanline___unfunfunfunfuniuniuniuniuniun_3C_uni_3E_( float x0, float dx,
|
||||
float y0, float dy,
|
||||
int width, int height,
|
||||
int xspan, int yspan,
|
||||
int maxIterations, int output[]) {}
|
||||
extern "C" void __global__ mandelbrot_ispc___unfunfunfunfuniuniuniun_3C_uni_3E_( float x0, float y0,
|
||||
float x1, float y1,
|
||||
int width, int height,
|
||||
int maxIterations, int output[]) { }
|
||||
|
||||
extern "C"
|
||||
void mandelbrot_ispc(float x0, float y0,
|
||||
float x1, float y1,
|
||||
int width, int height,
|
||||
int maxIterations, int output[])
|
||||
{
|
||||
mandelbrot_ispc___unfunfunfunfuniuniuniun_3C_uni_3E_<<<1,32>>>
|
||||
(x0,y0,x1,y1,width,height,maxIterations,output);
|
||||
cudaDeviceSynchronize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user