Skip to content

Commit

Permalink
Merged with commit 4ca6ba9
Browse files Browse the repository at this point in the history
  • Loading branch information
theraysmith committed Nov 21, 2016
2 parents dd216f6 + 8bff1e6 commit 9c7e99b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
4 changes: 2 additions & 2 deletions classify/adaptmatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,14 +818,14 @@ int Classify::GetAdaptiveFeatures(TBLOB *Blob,
classify_norm_method.set_value(baseline);
Features = ExtractPicoFeatures(Blob);

*FloatFeatures = Features;

NumFeatures = Features->NumFeatures;
if (NumFeatures > UNLIKELY_NUM_FEAT) {
FreeFeatureSet(Features);
return 0;
}

ComputeIntFeatures(Features, IntFeatures);
*FloatFeatures = Features;

return NumFeatures;
} /* GetAdaptiveFeatures */
Expand Down
11 changes: 6 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ AM_CONDITIONAL([T_WIN], false)
AM_CONDITIONAL([MINGW], false)
AM_CONDITIONAL([OSX], false)
AM_CONDITIONAL([GRAPHICS_DISABLED], false)
AC_SUBST([AM_CPPFLAGS])

OPENCL_INC="/opt/AMDAPP/include"
OPENCL_LIBS="-lOpenCL -ltiff"
Expand Down Expand Up @@ -154,7 +155,7 @@ AC_ARG_ENABLE([cube],
AC_MSG_RESULT([$disable_cube])
AM_CONDITIONAL([NO_CUBE_BUILD], [test "$disable_cube" = "yes"])
if test "$disable_cube" = "yes"; then
AC_SUBST([AM_CPPFLAGS], [-DNO_CUBE_BUILD])
AM_CPPFLAGS="-DNO_CUBE_BUILD $AM_CPPFLAGS"
fi
# check whether to build embedded version
Expand All @@ -166,15 +167,15 @@ AC_ARG_ENABLE([embedded],
AC_MSG_RESULT([$enable_embedded])
AM_CONDITIONAL([EMBEDDED], [test "$enable_embedded" = "yes"])
if test "$enable_embedded" = "yes"; then
AC_SUBST([AM_CPPFLAGS], [-DEMBEDDED])
AM_CPPFLAGS="-DEMBEDDED $AM_CPPFLAGS"
fi
# check whether to build OpenMP support
AM_CONDITIONAL([OPENMP], false)
AC_OPENMP
AS_IF([test "x$OPENMP_CFLAGS" != "x"],
[AM_CONDITIONAL([OPENMP], true)
AC_SUBST([AM_CPPFLAGS], ["$OPENMP_CXXFLAGS"])
AM_CPPFLAGS="$OPENMP_CXXFLAGS $AM_CPPFLAGS"
AC_DEFINE([OPENMP], [], [Defined when compiled with OpenMP support])]
)
Expand Down Expand Up @@ -227,7 +228,7 @@ case "${host_os}" in
if !($have_opencl_lib); then
AC_MSG_ERROR([Required OpenCL library not found!])
fi
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
AM_CPPFLAGS="-DUSE_OPENCL $AM_CPPFLAGS"
OPENCL_CPPFLAGS=""
OPENCL_LDFLAGS="-framework OpenCL"
fi
Expand All @@ -246,7 +247,7 @@ case "${host_os}" in
if !($have_tiff); then
AC_MSG_ERROR([Required TIFF headers not found! Try to install libtiff-dev?? package.])
fi
AC_SUBST([AM_CPPFLAGS], [-DUSE_OPENCL])
AM_CPPFLAGS="-DUSE_OPENCL $AM_CPPFLAGS"
OPENCL_CPPFLAGS="-I${OPENCL_INC}"
OPENCL_LDFLAGS="${OPENCL_LIBS}"
fi
Expand Down
14 changes: 0 additions & 14 deletions opencl/opencl_device_selection.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,19 +589,5 @@ static ds_status readProfileFromFile(ds_profile* profile,
return status;
}

static ds_status getNumDeviceWithEmptyScore(ds_profile* profile,
unsigned int* num) {
unsigned int i;
if (profile == NULL || num==NULL)
return DS_MEMORY_ERROR;
*num=0;
for (i = 0; i < profile->numDevices; i++) {
if (profile->devices[i].score == NULL) {
*num++;
}
}
return DS_SUCCESS;
}

#endif
#endif
13 changes: 11 additions & 2 deletions opencl/openclwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ int OpenclDevice::GeneratBinFromKernelSource( cl_program program, const char * c
{
unsigned int i = 0;
cl_int clStatus;
size_t *binarySizes, numDevices = 0;
size_t *binarySizes;
cl_uint numDevices;
cl_device_id *mpArryDevsID;
char **binaries, *str = NULL;

Expand Down Expand Up @@ -591,7 +592,7 @@ int OpenclDevice::CompileKernelFile( GPUEnv *gpuInfo, const char *buildOption )
const char *source;
size_t source_size[1];
int b_error, binary_status, binaryExisted, idx;
size_t numDevices;
cl_uint numDevices;
cl_device_id *mpArryDevsID;
FILE *fd, *fd1;
const char* filename = "kernel.cl";
Expand Down Expand Up @@ -1132,6 +1133,7 @@ OpenclDevice::pixReadMemTiffCl(const l_uint8 *data,size_t size,l_int32 n)
// L_MEMSTREAM *memStream;
PROCNAME("pixReadMemTiffCl");

<<<<<<< HEAD
if (!data)
return (PIX *)ERROR_PTR("data pointer is NULL", procName, NULL);

Expand All @@ -1158,6 +1160,13 @@ OpenclDevice::pixReadMemTiffCl(const l_uint8 *data,size_t size,l_int32 n)
TIFFCleanup(tif);
return NULL;
}
=======
if (pagefound == FALSE) {
L_WARNING("tiff page %d not found", procName, i);
TIFFCleanup(tif);
return NULL;
}
>>>>>>> 8bff1e618ff4f14dfacd523ff0b57b944999f24f

TIFFCleanup(tif);
return pix;
Expand Down

0 comments on commit 9c7e99b

Please sign in to comment.