aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernels/oclconv/oclconv.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/kernels/oclconv/oclconv.cpp b/src/kernels/oclconv/oclconv.cpp
index 2c99bf3..05f884c 100644
--- a/src/kernels/oclconv/oclconv.cpp
+++ b/src/kernels/oclconv/oclconv.cpp
@@ -93,13 +93,6 @@ static int oclconv_imgproc(char *kernelName, unsigned char *data_in, unsigned ch
93#endif 93#endif
94 return 0; 94 return 0;
95} 95}
96/*----------------------------------------------------------------------------------------------------------------------*/
97static bool canny_first_call = true;
98static Context canny_ctx(CL_DEVICE_TYPE_ACCELERATOR);
99static CommandQueue *canny_Q;
100static Buffer *canny_gradX, *canny_gradY, *canny_mag, *canny_scratch, *canny_numItems;
101static Kernel *canny_K;
102static Buffer *canny_input, *canny_output;
103 96
104/****************************************************************************** 97/******************************************************************************
105 * Canny Edge Detection - called on ARM, but algorithm dispatched to 1 DSP 98 * Canny Edge Detection - called on ARM, but algorithm dispatched to 1 DSP
@@ -113,9 +106,16 @@ static Buffer *canny_input, *canny_output;
113 *****************************************************************************/ 106 *****************************************************************************/
114static int ocl_canny(unsigned char *data_in, unsigned char *data_out, unsigned short height, unsigned short width) 107static int ocl_canny(unsigned char *data_in, unsigned char *data_out, unsigned short height, unsigned short width)
115{ 108{
116 int numelem = (int)height*(int)width; 109 int numelem = (int)height*(int)width;
110 static bool canny_first_call = true;
111 CommandQueue *canny_Q;
112 Buffer *canny_gradX, *canny_gradY, *canny_mag, *canny_scratch, *canny_numItems;
113 Kernel *canny_K;
114 Buffer *canny_input, *canny_output;
115
117 try 116 try
118 { 117 {
118 Context canny_ctx(CL_DEVICE_TYPE_ACCELERATOR);
119 Event canny_ev, canny_ev1, canny_ev2; 119 Event canny_ev, canny_ev1, canny_ev2;
120 /*--------------------------------------------------------------------- 120 /*---------------------------------------------------------------------
121 * Cache as much OpenCL plumbing on the first call, so the cost is not 121 * Cache as much OpenCL plumbing on the first call, so the cost is not