- Return error on origin > 0 or region > 1 when its not allowed
- For 1Darray, array region and origin are stored on 2nd position.
For 2Darray, its on 3rd postion
- Fix map offset for 1Darray image
- Fix CPU data transfer for 1Darray image
Change-Id: Id35ba5f54f117e7af318ca7e6e03c1fc942ce729
- Dont make cpu/gpu writes on read-only unmap
- Read/Write on limited map range only
- Overlaps checks for non read-only maps
- Fixed cmd type on returned event
Change-Id: I98ca542e8d369d2426a87279f86cadb0bf3db299
- Introducing MapInfo struct which will be used as container for multiple
map operations
- Unified mapped offset and size for Buffers and Images
- Fixed incorrect map params for CPU and GPU path
- Missing API level checks
Change-Id: Ib4077c9e2c0c333b131ffd5ccbc4a1404920eb5b
Use conditionals and a macro to avoid provoking compilers that do
not support this attribute.
Adds a macro named CPP_ATTRIBUTE_FALLTHROUGH which is invoked right
before a following case statement to declare that the intent is to
fall through. Example:
...
case xxx:
...
CPP_ATTRIBUTE_FALLTHROUGH;
case yyy:
...
The gcc/clang alternative of adding comments that contain "FALLTHROUGH"
suffers from the problem that *by default* ccache strips the comments
so that they are not present for the real compilation.
Change-Id: I77ddeb7dae46db8398b014a93f6a71bedc64ada9
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>
- Curently each non-zerocopy CPU operation on map/unmap make a full copy
using hostPtr
- This commit adds functionality to select specific range of copy
- Multiple mapping with different size is not supported yet,
so copy will be made on full range for now. This is for future usage.
Change-Id: I7652e85482ba6fffb2474169447baf9b080dcd1e
- Some of the paths were made only for ULTs
- Params like mappedPtr were ignored
- Improve confusing method names
- Fix for memory leak in map shared buffer path (not tested code)
Change-Id: I8a69035f1d1c340f2d131a6f8d7e13116e3ddabc
For the new Linux/Fedora configuration with introduction of gcc 7.2,
option -Wimplicit-fallthrough is implemented. This option requests a
warning if a switch case falls through into the next case. This was
causing build errors.
For C++17 (and g++ 7 regardless), standard attribute [[fallthrough]]
notifies the compiler that the fallthrough is intentional.
For clang++ 5 (with -std=c++11 or later) and g++ 7, built-in
preprocessor function __has_cpp_attribute(fallthrough) returns true.
Currently, msvc does not have __has_cpp_attribute.
Note: The use of __has_cpp_attribute has been proposed for c++2x and
is advocated by (81-char link broken in two to avoid 80 char hard limit):
https://isocpp.org/std/standing-documents/
sd-6-sg10-feature-test-recommendations
For gcc 7, a comment consisting of "FALLTHROUGH" will accomplish the
same thing with -Wimplicit-fallthrough=<n>, for n <= 4.
The diagnostic:
/opt/src/src/vpg-compute-neo/runtime/mem_obj/image.cpp:146:24: error:
this statement may fall through [-Werror=implicit-fallthrough=]
imageDepth = imageDesc->image_depth;
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/opt/src/src/vpg-compute-neo/runtime/mem_obj/image.cpp:148:9: note: here
case CL_MEM_OBJECT_IMAGE2D:
^~~~
Change-Id: I604700a23b09c8bf22baf5614700a8b76dbe4cdd
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>