Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cuda_lab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
cuda_lab
Commits
d7e32b4a
Commit
d7e32b4a
authored
Mar 28, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/gkernel/cuda_lab
parents
3036349a
90638d4c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
9 deletions
+6
-9
.gitignore
.gitignore
+1
-4
cuda-project.pro
miklos/project_integration/cuda-project.pro
+1
-1
glwidget.h
miklos/project_integration/glwidget.h
+1
-1
kernel.cu
miklos/project_integration/kernel.cu
+1
-1
kernel.h
miklos/project_integration/kernel.h
+1
-1
main.cpp
miklos/project_integration/main.cpp
+1
-1
No files found.
.gitignore
View file @
d7e32b4a
...
@@ -6,8 +6,5 @@ image_result.png
...
@@ -6,8 +6,5 @@ image_result.png
*.project
*.project
*.settings
*.settings
*.settings/*
*.settings/*
miklos/sample_qt_opengl_cuda_shit_without_camera/moc_glwidget.cpp
moc_*.cpp
miklos/sample_qt_opengl_cuda_shit_without_camera/Makefile
miklos/sample_qt_opengl_cuda_shit_without_camera/hello-opengl
*.o
*.o
miklos/project_integration/
hello-opengl
.pro
→
miklos/project_integration/
cuda-project
.pro
View file @
d7e32b4a
QT
+=
core
gui
opengl
QT
+=
core
gui
opengl
CONFIG
+=
debug
CONFIG
+=
debug
TARGET
=
hello
-
opengl
TARGET
=
main
TEMPLATE
=
app
TEMPLATE
=
app
...
...
miklos/project_integration/glwidget.h
View file @
d7e32b4a
...
@@ -12,7 +12,6 @@ public:
...
@@ -12,7 +12,6 @@ public:
explicit
GlWidget
(
QWidget
*
parent
=
0
);
explicit
GlWidget
(
QWidget
*
parent
=
0
);
~
GlWidget
();
~
GlWidget
();
QSize
sizeHint
()
const
;
QSize
sizeHint
()
const
;
float
*
d_in
;
protected
:
protected
:
void
initializeGL
();
void
initializeGL
();
...
@@ -20,6 +19,7 @@ protected:
...
@@ -20,6 +19,7 @@ protected:
private
:
private
:
QGLFunctions
gl
;
QGLFunctions
gl
;
float
*
d_in
;
};
};
#endif // GLWIDGET_H
#endif // GLWIDGET_H
miklos/project_integration/kernel.cu
View file @
d7e32b4a
...
@@ -107,7 +107,7 @@ inline dim3 make_grid(dim3 whole, dim3 block)
...
@@ -107,7 +107,7 @@ inline dim3 make_grid(dim3 whole, dim3 block)
static float *d_T, *d_F, *d_Xi, *d_Xj;
static float *d_T, *d_F, *d_Xi, *d_Xj;
void allocate_device_memory(
float *d_in,
size_t w, size_t h)
void allocate_device_memory(size_t w, size_t h)
{
{
size_t imageBytes = w*h*sizeof(float);
size_t imageBytes = w*h*sizeof(float);
cudaMalloc(&d_T, imageBytes);
cudaMalloc(&d_T, imageBytes);
...
...
miklos/project_integration/kernel.h
View file @
d7e32b4a
#ifndef KERNEL_H
#ifndef KERNEL_H
#define KERNEL_H
#define KERNEL_H
extern
"C"
void
allocate_device_memory
(
float
*
d_in
,
size_t
width
,
size_t
height
);
extern
"C"
void
allocate_device_memory
(
size_t
width
,
size_t
height
);
extern
"C"
void
executeKernel
(
float
*
d_in
,
void
*
d_out
,
size_t
width
,
size_t
height
);
extern
"C"
void
executeKernel
(
float
*
d_in
,
void
*
d_out
,
size_t
width
,
size_t
height
);
#endif // KERNEL_H
#endif // KERNEL_H
miklos/project_integration/main.cpp
View file @
d7e32b4a
...
@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
...
@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
}
}
QObject
::
connect
(
&
camera
,
SIGNAL
(
newFrame
()),
&
w
,
SLOT
(
updateGL
()));
QObject
::
connect
(
&
camera
,
SIGNAL
(
newFrame
()),
&
w
,
SLOT
(
updateGL
()));
allocate_device_memory
(
w
.
d_in
,
camera
.
width
(),
camera
.
height
());
allocate_device_memory
(
camera
.
width
(),
camera
.
height
());
camera
.
start
();
camera
.
start
();
w
.
show
();
w
.
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment