OPTION(ENABLE_TENSORFLOW "Enable tensorflow support" OFF)
OPTION(INSTALL_EXAMPLE_APP "Install example applications" OFF)
OPTION(ENABLE_TEST "Enable tests" ON)
+OPTION(ENABLE_ORC "Enable ORC" ON)
IF(INSTALL_EXAMPLE_APP)
IF(EXAMPLE_EXEC_PREFIX)
glib-2.0
)
+IF(ENABLE_ORC)
+ FIND_LIBRARY(ORC_LIB orc-0.4)
+ IF(ORC_LIB)
+ SET(PKG_MODULES ${PKG_MODULES} orc-0.4)
+ ADD_DEFINITIONS(-DHAVE_ORC)
+ ELSE(ORC_LIB)
+ MESSAGE("Cannot find orc library")
+ ENDIF(ORC_LIB)
+ENDIF(ENABLE_ORC)
+
pkg_check_modules(pkgs REQUIRED ${PKG_MODULES})
INCLUDE_DIRECTORIES(
debhelper (>=9),
gstreamer1.0-tools, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good,
libpng-dev, tensorflow-lite-dev, tensorflow-dev [amd64 arm64], libcairo2-dev, libopencv-dev,
- ssat, python, python-numpy
+ liborc-0.4-dev, ssat, python, python-numpy
Standards-Version: 3.9.6
Homepage: https://github.com/nnsuite/nnstreamer
#include <gst/base/gstcollectpads.h>
#include <gst/gstplugin.h>
+#ifdef HAVE_ORC
+#include <orc/orc.h>
+
+#define nns_memcpy(d,s,n) do { \
+ if ((n) > 100) orc_memcpy ((d), (s), (n)); \
+ else memcpy ((d), (s), (n)); \
+ } while (0)
+
+#define nns_memset orc_memset
+#else
+#define nns_memcpy memcpy
+#define nns_memset memset
+#endif
+
G_BEGIN_DECLS
/**
do {
for (f = 0; f < self->frames_out; f++) {
- memcpy (dest_info.data + dest_idx,
+ nns_memcpy (dest_info.data + dest_idx,
src_info.data + src_idx + (frame_size * f), block_size);
dest_idx += block_size;
}
if (from == to) {
/** Useless memcpy. Do not call this or @todo do "IP" operation */
- memcpy (outptr, inptr, gst_tensor_info_get_size (&filter->in_config.info));
+ nns_memcpy (outptr, inptr,
+ gst_tensor_info_get_size (&filter->in_config.info));
GST_WARNING_OBJECT (filter,
"Calling tensor_transform with high memcpy overhead WITHOUT any effects! Check your stream wheter you really need tensor_transform.\n");
return GST_FLOW_OK;
for (j = 0; j < toDim[to]; j++) {
uint8_t *j_destptr = destptr + loopBlockSize * j;
for (k = 0; k < copyblocklimit; k++) {
- memcpy (j_destptr + copyblocksize * k,
+ nns_memcpy (j_destptr + copyblocksize * k,
srcptr + k * copyblocksize * toDim[to] + j * copyblocksize,
copyblocksize);
}
inidx = SK*SJ*SI*l + SJ*SI*k + SI*j + i; \
const uint8_t *_in = inptr+inidx*typesize; \
uint8_t *_out = outptr + outidx *typesize; \
- memcpy(_out, _in, typesize); \
+ nns_memcpy(_out, _in, typesize); \
} \
} while(0);
}
if (!checkdim) {
- memcpy (outptr, inptr, gst_tensor_info_get_size (&filter->in_config.info));
+ nns_memcpy (outptr, inptr,
+ gst_tensor_info_get_size (&filter->in_config.info));
GST_WARNING_OBJECT (filter,
"Calling tensor_transform with high memcpy overhead WITHOUT any effects!");
return GST_FLOW_OK;
# Unit Testing Uses SSAT (hhtps://github.com/myungjoo/SSAT.git)
BuildRequires: ssat
+# For ORC (Oil Runtime Compiler)
+BuildRequires: orc-devel
+
%package unittest-coverage
Summary: NNStreamer UnitTest Coverage Analysis Result
%description unittest-coverage