Commit 863f8ba8 authored by Miklós Homolya's avatar Miklós Homolya

fix unnecessary state exposure

parent 9e1f16ff
......@@ -12,7 +12,6 @@ public:
explicit GlWidget(QWidget *parent = 0);
~GlWidget();
QSize sizeHint() const;
float *d_in;
protected:
void initializeGL();
......@@ -20,6 +19,7 @@ protected:
private:
QGLFunctions gl;
float *d_in;
};
#endif // GLWIDGET_H
......@@ -107,7 +107,7 @@ inline dim3 make_grid(dim3 whole, dim3 block)
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);
cudaMalloc(&d_T, imageBytes);
......
#ifndef 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);
#endif // KERNEL_H
......@@ -17,7 +17,7 @@ int main(int argc, char *argv[])
}
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();
w.show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment