Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UGBlocks_V3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Phillip Lino Rall
UGBlocks_V3
Commits
a9ad75fc
Commit
a9ad75fc
authored
4 years ago
by
Peter Herbst
Browse files
Options
Downloads
Patches
Plain Diff
enable use of qt components like QMessageBox
parent
d5883d06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
program/program.pro
+12
-9
12 additions, 9 deletions
program/program.pro
program/source/extemp/cuda_helper.cu
+0
-2
0 additions, 2 deletions
program/source/extemp/cuda_helper.cu
with
12 additions
and
11 deletions
program/program.pro
+
12
−
9
View file @
a9ad75fc
...
...
@@ -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
"
...
...
This diff is collapsed.
Click to expand it.
program/source/extemp/cuda_helper.cu
+
0
−
2
View file @
a9ad75fc
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment