summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2227627)
raw | patch | inline | side by side (parent: 2227627)
author | Ajay Jayaraj <ajayj@ti.com> | |
Thu, 17 May 2018 21:58:47 +0000 (16:58 -0500) | ||
committer | Ajay Jayaraj <ajayj@ti.com> | |
Thu, 17 May 2018 21:58:47 +0000 (16:58 -0500) |
(MCT-987)
examples/Makefile | patch | blob | history | |
tidl_api/src/imgutil.cpp | patch | blob | history | |
tidl_api/src/ocl_device.cpp | patch | blob | history | |
tidl_api/src/util.cpp | patch | blob | history |
diff --git a/examples/Makefile b/examples/Makefile
index 817e0a7b8f3bf3b62c41e67e6c2cd00f57236d26..512e2edbb6984fdafb8afbe2bdc4b2bb9cba1933 100644 (file)
--- a/examples/Makefile
+++ b/examples/Makefile
-.SILENT:
-
-# All other examples
+# Copyright (c) 2018 Texas Instruments Incorporated - http://www.ti.com/
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Texas Instruments Incorporated nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+# THE POSSIBILITY OF SUCH DAMAGE.
+
+# Create a list of examples to build
MFS = $(wildcard */Makefile)
DIRS = $(patsubst %/Makefile,%,$(MFS))
define make_in_dirs
- for dir in $(1); do \
+ @for dir in $(1); do \
echo "=============== " $$dir " =================" ; \
$(MAKE) --no-print-directory $(MAKEFILE) -C $$dir $(2); \
done
all:
$(call make_in_dirs, $(DIRS), )
-.PHONY: test
-test:
- $(call make_in_dirs, $(DIRS), test)
-
-.PHONY: cross
-cross: all
-
.PHONY: clean
clean:
$(call make_in_dirs, $(DIRS), clean)
+realclean: clean
+ make -C ../tidl_api clean
index 3336ad2443724b51185b4c6f053d5e4a3983eae2..bcd7f2333b2ee8eaecb81075cd6a04d90e66fbb7 100644 (file)
--- a/tidl_api/src/imgutil.cpp
+++ b/tidl_api/src/imgutil.cpp
Mat spl[3];
int32_t enableMeanSub = 0;
Mat tempImage;
- int32_t meanVlaues[3];
+ int32_t meanVlaues[n];
if(preProcType == 0) // Caffe-Jacinto Models
{
index f539503f3d5918ed5f6d3aeb249e3216ca7c6844..270a58c1f1c92ff929704e43ee99dd42c2f5fc7f 100644 (file)
// Conservative till we have sufficient information.
cl_mem_flags flag = CL_MEM_READ_WRITE;
- if (hostPtrInCMEM) flag |= CL_MEM_USE_HOST_PTR;
- else flag |= CL_MEM_COPY_HOST_PTR;
+ if (hostPtrInCMEM) flag |= (cl_mem_flags)CL_MEM_USE_HOST_PTR;
+ else flag |= (cl_mem_flags)CL_MEM_COPY_HOST_PTR;
cl_int errcode;
cl_mem buffer = clCreateBuffer(context_m,
diff --git a/tidl_api/src/util.cpp b/tidl_api/src/util.cpp
index 8683e7eb73d8324cf0c81d354da86a854220803d..239b94399cfcc7719dc5182d207a4ffffd58a619 100644 (file)
--- a/tidl_api/src/util.cpp
+++ b/tidl_api/src/util.cpp
break;
}
- delete b1;
- delete b2;
+ delete[] b1;
+ delete[] b2;
if (errors == 0) return true;
}
}
- delete b1;
- delete b2;
+ delete[] b1;
+ delete[] b2;
return status;
}