Skip to content

Commit 1cf098d

Browse files
committed
opencl: Remove unused code
Signed-off-by: Stefan Weil <sw@weilnetz.de>
1 parent 34bdf99 commit 1cf098d

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

opencl/openclwrapper.cpp

-46
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,6 @@ static const l_uint32 rmask32[] = {
5858
0x01ffffff, 0x03ffffff, 0x07ffffff, 0x0fffffff, 0x1fffffff, 0x3fffffff,
5959
0x7fffffff, 0xffffffff};
6060

61-
struct tiff_transform {
62-
int vflip; /* if non-zero, image needs a vertical fip */
63-
int hflip; /* if non-zero, image needs a horizontal flip */
64-
int rotate; /* -1 -> counterclockwise 90-degree rotation,
65-
0 -> no rotation
66-
1 -> clockwise 90-degree rotation */
67-
};
68-
69-
static struct tiff_transform tiff_orientation_transforms[] = {
70-
{0, 0, 0},
71-
{0, 1, 0},
72-
{1, 1, 0},
73-
{1, 0, 0},
74-
{0, 1, -1},
75-
{0, 0, 1},
76-
{0, 1, 1},
77-
{0, 0, -1}
78-
};
79-
80-
static const l_int32 MAX_PAGES_IN_TIFF_FILE = 3000;
81-
8261
static cl_mem pixsCLBuffer, pixdCLBuffer, pixdCLIntermediate; //Morph operations buffers
8362
static cl_mem pixThBuffer; //output from thresholdtopix calculation
8463
static cl_int clStatus;
@@ -727,31 +706,6 @@ Pix *mapOutputCLBuffer(KernelEnv rEnv, cl_mem clbuffer, Pix *pixd, Pix *pixs,
727706
return pixd;
728707
}
729708

730-
static cl_mem allocateIntBuffer(KernelEnv rEnv, const l_uint32 *_pValues,
731-
size_t nElements, cl_int *pStatus,
732-
bool sync = false)
733-
{
734-
cl_mem xValues =
735-
clCreateBuffer(rEnv.mpkContext, (cl_mem_flags)(CL_MEM_READ_WRITE),
736-
nElements * sizeof(l_int32), nullptr, pStatus);
737-
738-
if (_pValues != nullptr) {
739-
l_int32 *pValues = (l_int32 *)clEnqueueMapBuffer(
740-
rEnv.mpkCmdQueue, xValues, CL_TRUE, CL_MAP_WRITE, 0,
741-
nElements * sizeof(l_int32), 0, nullptr, nullptr, nullptr);
742-
743-
memcpy(pValues, _pValues, nElements * sizeof(l_int32));
744-
745-
clEnqueueUnmapMemObject(rEnv.mpkCmdQueue, xValues, pValues, 0, nullptr,
746-
nullptr);
747-
748-
if (sync) clFinish(rEnv.mpkCmdQueue);
749-
}
750-
751-
return xValues;
752-
}
753-
754-
755709
void OpenclDevice::releaseMorphCLBuffers()
756710
{
757711
if (pixdCLIntermediate != nullptr) clReleaseMemObject(pixdCLIntermediate);

0 commit comments

Comments
 (0)