Skip to content
Snippets Groups Projects
Commit a9ad75fc authored by Peter Herbst's avatar Peter Herbst
Browse files

enable use of qt components like QMessageBox

parent d5883d06
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,9 @@ TARGET=run
DEFINES += DEVELOP _OPENMP
#Create a console window
#CONFIG += console
# placing *.o files in bin_o
unix: OBJECTS_DIR=bin_o
unix: UI_DIR = UI_FILES
......@@ -25,7 +28,6 @@ unix:QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
win32:QMAKE_CXXFLAGS_WARN_ON = /W3 /w44100 /w44503
#unix:QMAKE_CXXFLAGS+="-fexec-charset=ISO-8859-1"
include(ugblocks3D.pri)
include(../program2D/ugblocks2D.pri)
include(../program2D/ugblocks2D3D.pri)
......@@ -37,6 +39,7 @@ INCLUDEPATH += ../linAlgExptemp
#Setup to compile CUDA files
CUDA_SOURCES += main.cu source/extemp/cuda_helper.cu # let NVCC know which file you want to compile
#nvcc config
SYSTEM_NAME = x64 # Depending on your system either 'Win32', 'x64', or 'Win64'
SYSTEM_TYPE = 64 # '32' or '64', depending on your system
CUDA_ARCH = sm_60 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10'
......@@ -44,20 +47,20 @@ NVCC_OPTIONS += --use_fast_math --extended-lambda -w
# include paths
INCLUDEPATH += $$CUDA_DIR/include
# library directories
//QMAKE_LIBDIR += $$join(CUDA_DIR,'" -I"','-I"','')/lib/$$SYSTEM_NAME\
INCLUDEPATH += $$QT_DIR/include
INCLUDEPATH += $$QT_DIR/include/QtCore
INCLUDEPATH += $$QT_DIR/include/QtWidgets
# Add the necessary libraries
LIBS += -lcuda -lcudart -lcufft
LIBS += $$join(CUDA_DIR, '" -L"', '-L"', '')/lib/$$SYSTEM_NAME\" #LIB Directory of CUDA
#add quotation for those directories contain space (Windows required)
CUDA_INC +=$$join(INCLUDEPATH,'" -I"','-I"','"') #All Includes
CUDA_INC += $$join(QT_DIR,'" -I"','-I"','/include"') #Include Directory of QT
CUDA_INC += $$join(QT_DIR,'" -I"','-I"','/include/QtCore"')
#Add necessary QT Libs here, see qt documentation for more information
QT += widgets
#Transform the INCLUDEPATH Variable for nvcc - add quotation for those directories contain space (Windows required)
CUDA_INC +=$$join(INCLUDEPATH,'" -I"','-I"','"')
#nvcc config
# MSVCRT link option (static or dynamic, it must be the same with your Qt SDK link option)
MSVCRT_LINK_FLAG_DEBUG = "/MDd"
MSVCRT_LINK_FLAG_RELEASE = "/MD"
......
......@@ -66,8 +66,6 @@ double CudaDotproduct(double* InputA, double* InputB, int InputSize)
//Third parameter is the size of the shared memory
EfficientDotproduct<<<blocks, threads, threads * sizeof(double)>>>(tempBufferDevice, InputA, InputB, InputSize);
cudaDeviceSynchronize();
cudaMemcpy(tempBufferHost, tempBufferDevice, sizeof(double), cudaMemcpyDeviceToHost);
return *tempBufferHost;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment