Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

integrate cuda a little better

i don't think this is the best way to do it, but it works for the moment.
  • Loading branch information...
commit f73af282403748959861268d47c03970d8ab9ee1 1 parent b7e4f18
@novas0x2a novas0x2a authored
View
13 config/cuda.mak
@@ -1,13 +1,6 @@
# Makerules.
-SUFFIXES += .cu.o .cu.lo .cu
-
-.cu.o:
- nvcc $< -c $@
-
-.cu.lo:
- nvcc $< -c $@
-
-.cu:
- nvcc $< -o $@
+NVCC=nvcc
+.cu.cc:
+ $(NVCC) $(ASP_CPPFLAGS) --cuda $< -o $@
View
2  configure.ac
@@ -282,7 +282,7 @@ AX_PKG(VW_CAMERA, [BOOST], [-lvwCamera], [vw/Camera/CAHVModel.h])
AX_PKG(VW_CARTOGRAPHY, [BOOST], [-lvwCartography], [vw/Cartography/GeoReference.h])
AX_PKG(VW_INTEREST_POINT, [BOOST], [-lvwInterestPoint])
-AX_PKG(CUDA, [], [-lcuda], [cuda.h])
+AX_PKG(CUDA, [], [-lcuda -lcudart], [cuda.h])
AX_PKG(OPENSCENEGRAPH, [], [-losg -losgDB -lOpenThreads -losgViewer -losgText -losgGA -losgFX -losgTerrain -losgUtil], [osg/ref_ptr])
AX_PKG(MBA10, [BOOST], [-lMBA_1.0_gpl_opt], [MBA.h])
View
6 src/Makefile.am
@@ -176,8 +176,8 @@ endif
if MAKE_APP_CUDATEST
bin_PROGRAMS += cuda_test
- CUDATEST_SOURCES = cuda_test.cu
- CUDATEST_LDFLAGS = $(APP_CUDATEST_LIBS) $(ASP_LDFLAGS) -lcuda
+ cuda_test_SOURCES = cuda_test.cu
+ cuda_test_LDFLAGS = $(APP_CUDATEST_LIBS)
endif
AM_CPPFLAGS = @ASP_CPPFLAGS@
@@ -187,4 +187,6 @@ AM_LDFLAGS = @ASP_LDFLAGS@
# Tests #
##############################################################################
+CLEANFILES=cuda_test.cc
+
include $(top_srcdir)/config/rules.mak
View
6 src/cuda_test.cu
@@ -1,8 +1,8 @@
// VW
-#include <vw/vw.h>
+//#include <vw/vw.h>
// includes, system
-#include <iostream>
+//#include <iostream>
// includes, project
#include <cuda.h>
@@ -38,7 +38,7 @@ int main (int argc, char *argv[])
// ... fill arguments array ‘arg’ ....
- cout << "Hello, world3.\n";
+ //cout << "Hello, world3.\n";
cudaStat = cudaMalloc ((void **)&acosArg, N * sizeof(acosArg[0]));
cudaStat = cudaMemcpy (acosArg, arg, N * sizeof(arg[0]), cudaMemcpyHostToDevice);
Please sign in to comment.
Something went wrong with that request. Please try again.