mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 06:18:03 +03:00
removed drivers from main configuration
This commit is contained in:
63 files changed
-37008
No files matched your search
@@ -1 +0,0 @@
|
||||
065e4eb
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copy the release build of the intel-hard-graphics mesa fork into this
|
||||
# directory; hw-ivb-drivers turns the files into the system's Vulkan (hasvk),
|
||||
# Direct3D 9 (gallium nine) and OpenCL (rusticl) drivers.
|
||||
#
|
||||
# drivers/ivb/update.sh ninja + install both release builds, copy
|
||||
# nixos-rebuild switch then
|
||||
#
|
||||
# The release builds are configured in the fork (meson setup release /
|
||||
# release32, see its flake's release shells, pinned to this system's nixpkgs).
|
||||
set -euo pipefail
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
fork=${IVB_FORK:-/mnt/HDD/linuxdata/Projects_XFS/Drivers/intel-hard-graphics}
|
||||
|
||||
stage() { # build dir, profile, arch dir, files...
|
||||
local build=$1 profile=$2 arch=$3
|
||||
shift 3
|
||||
local tmp
|
||||
tmp=$(mktemp -d)
|
||||
(cd "$fork" && nix develop ".profiles/$profile" -c ninja -C "$build" &&
|
||||
nix develop ".profiles/$profile" -c meson install -C "$build" --no-rebuild \
|
||||
--destdir "$tmp" --quiet)
|
||||
mkdir -p "$here/$arch"
|
||||
for f in "$@"; do
|
||||
install -m 0755 "$tmp/usr/local/lib/$f" "$here/$arch/$(basename "$f")"
|
||||
done
|
||||
rm -rf "$tmp"
|
||||
}
|
||||
|
||||
stage release release x86_64 \
|
||||
libvulkan_intel_hasvk13.so d3d/d3dadapter9.so.1 libRusticlOpenCL.so.1
|
||||
stage release32 release-i686 i686 \
|
||||
libvulkan_intel_hasvk13.so d3d/d3dadapter9.so.1
|
||||
|
||||
(cd "$fork" && printf '%s\n' "$(jj log -r @- --no-graph -T 'commit_id.short() ++ " " ++ description.first_line()' 2>/dev/null ||
|
||||
git rev-parse --short HEAD 2>/dev/null)") > "$here/SOURCE"
|
||||
ls -la "$here"/x86_64 "$here"/i686
|
||||
echo "source: $(cat "$here/SOURCE")"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,2 +0,0 @@
|
||||
pocl f621e6b531a3 gen7: the recorder saves a program's source before building it, so a compiler crash still leaves it
|
||||
libgbe c3af170fe1e9 backend: lock the clang stage of programNewFromSource like the other entry points (it resets and parses process-wide llvm::cl options, so two programs built at once raced); report a failed link with the builtin library as a build error instead of an empty, successful program
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_H__
|
||||
#define __OCL_H__
|
||||
|
||||
/* LLVM 3.9 has these pre defined undef them first */
|
||||
#ifdef cl_khr_3d_image_writes
|
||||
#undef cl_khr_3d_image_writes
|
||||
#endif
|
||||
#ifdef cl_khr_byte_addressable_store
|
||||
#undef cl_khr_byte_addressable_store
|
||||
#endif
|
||||
#ifdef cl_khr_fp16
|
||||
#undef cl_khr_fp16
|
||||
#endif
|
||||
#ifdef cl_khr_fp64
|
||||
#undef cl_khr_fp64
|
||||
#endif
|
||||
#ifdef cl_khr_global_int32_base_atomics
|
||||
#undef cl_khr_global_int32_base_atomics
|
||||
#endif
|
||||
#ifdef cl_khr_global_int32_extended_atomics
|
||||
#undef cl_khr_global_int32_extended_atomics
|
||||
#endif
|
||||
#ifdef cl_khr_gl_sharing
|
||||
#undef cl_khr_gl_sharing
|
||||
#endif
|
||||
#ifdef cl_khr_icd
|
||||
#undef cl_khr_icd
|
||||
#endif
|
||||
#ifdef cl_khr_local_int32_base_atomics
|
||||
#undef cl_khr_local_int32_base_atomics
|
||||
#endif
|
||||
#ifdef cl_khr_local_int32_extended_atomics
|
||||
#undef cl_khr_local_int32_extended_atomics
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_d3d10_sharing
|
||||
#undef cl_khr_d3d10_sharing
|
||||
#endif
|
||||
#ifdef cl_khr_gl_event
|
||||
#undef cl_khr_gl_event
|
||||
#endif
|
||||
#ifdef cl_khr_int64_base_atomics
|
||||
#undef cl_khr_int64_base_atomics
|
||||
#endif
|
||||
#ifdef cl_khr_int64_extended_atomics
|
||||
#undef cl_khr_int64_extended_atomics
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_d3d11_sharing
|
||||
#undef cl_khr_d3d11_sharing
|
||||
#endif
|
||||
#ifdef cl_khr_depth_images
|
||||
#undef cl_khr_depth_images
|
||||
#endif
|
||||
#ifdef cl_khr_dx9_media_sharing
|
||||
#undef cl_khr_dx9_media_sharing
|
||||
#endif
|
||||
#ifdef cl_khr_gl_depth_images
|
||||
#undef cl_khr_gl_depth_images
|
||||
#endif
|
||||
#ifdef cl_khr_spir
|
||||
#undef cl_khr_spir
|
||||
#endif
|
||||
|
||||
#include "ocl_defines.h"
|
||||
#include "ocl_types.h"
|
||||
#include "ocl_as.h"
|
||||
#include "ocl_async.h"
|
||||
#include "ocl_common.h"
|
||||
#include "ocl_convert.h"
|
||||
#include "ocl_float.h"
|
||||
#include "ocl_geometric.h"
|
||||
#include "ocl_image.h"
|
||||
#include "ocl_integer.h"
|
||||
#include "ocl_memcpy.h"
|
||||
#include "ocl_memset.h"
|
||||
#include "ocl_misc.h"
|
||||
#include "ocl_printf.h"
|
||||
#include "ocl_relational.h"
|
||||
#include "ocl_sync.h"
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
#include "ocl_vload_20.h"
|
||||
#include "ocl_atom_20.h"
|
||||
#include "ocl_pipe.h"
|
||||
#include "ocl_math_20.h"
|
||||
#include "ocl_enqueue.h"
|
||||
#else
|
||||
#include "ocl_vload.h"
|
||||
#include "ocl_atom.h"
|
||||
#include "ocl_math.h"
|
||||
#endif
|
||||
#include "ocl_workitem.h"
|
||||
#include "ocl_simd.h"
|
||||
#include "ocl_work_group.h"
|
||||
|
||||
/* Move these out from ocl_defines.h for only one define */
|
||||
#define cl_khr_global_int32_base_atomics
|
||||
#define cl_khr_global_int32_extended_atomics
|
||||
#define cl_khr_local_int32_base_atomics
|
||||
#define cl_khr_local_int32_extended_atomics
|
||||
#define cl_khr_byte_addressable_store
|
||||
#define cl_khr_icd
|
||||
#define cl_khr_gl_sharing
|
||||
#define cl_khr_spir
|
||||
#define cl_khr_fp16
|
||||
#define cl_khr_3d_image_writes
|
||||
#define cl_intel_subgroups
|
||||
#define cl_intel_subgroups_short
|
||||
#define cl_intel_planar_yuv
|
||||
#define cl_intel_media_block_io
|
||||
|
||||
#if __clang_major__*10 + __clang_minor__ > 40
|
||||
#define cl_intel_required_subgroup_size
|
||||
#endif
|
||||
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : disable
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : disable
|
||||
/* OpenCL C 3.0: clang keeps fp64 on because this library declares double
|
||||
functions; kernels must not see the feature the device lacks */
|
||||
#if (__OPENCL_C_VERSION__ >= 300)
|
||||
#undef __opencl_c_fp64
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,646 +0,0 @@
|
||||
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporatio
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __OCL_AS_H__
|
||||
#define __OCL_AS_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
OVERLOADABLE uchar as_uchar(char v);
|
||||
OVERLOADABLE char as_char(uchar v);
|
||||
OVERLOADABLE ushort as_ushort(short v);
|
||||
OVERLOADABLE char2 as_char2(short v);
|
||||
OVERLOADABLE uchar2 as_uchar2(short v);
|
||||
OVERLOADABLE half as_half(short v);
|
||||
OVERLOADABLE short as_short(ushort v);
|
||||
OVERLOADABLE char2 as_char2(ushort v);
|
||||
OVERLOADABLE uchar2 as_uchar2(ushort v);
|
||||
OVERLOADABLE half as_half(ushort v);
|
||||
OVERLOADABLE short as_short(char2 v);
|
||||
OVERLOADABLE ushort as_ushort(char2 v);
|
||||
OVERLOADABLE uchar2 as_uchar2(char2 v);
|
||||
OVERLOADABLE half as_half(char2 v);
|
||||
OVERLOADABLE short as_short(uchar2 v);
|
||||
OVERLOADABLE ushort as_ushort(uchar2 v);
|
||||
OVERLOADABLE char2 as_char2(uchar2 v);
|
||||
OVERLOADABLE half as_half(uchar2 v);
|
||||
OVERLOADABLE short as_short(half v);
|
||||
OVERLOADABLE ushort as_ushort(half v);
|
||||
OVERLOADABLE char2 as_char2(half v);
|
||||
OVERLOADABLE uchar2 as_uchar2(half v);
|
||||
OVERLOADABLE uint as_uint(int v);
|
||||
OVERLOADABLE short2 as_short2(int v);
|
||||
OVERLOADABLE ushort2 as_ushort2(int v);
|
||||
OVERLOADABLE char3 as_char3(int v);
|
||||
OVERLOADABLE char4 as_char4(int v);
|
||||
OVERLOADABLE uchar3 as_uchar3(int v);
|
||||
OVERLOADABLE uchar4 as_uchar4(int v);
|
||||
OVERLOADABLE float as_float(int v);
|
||||
OVERLOADABLE half2 as_half2(int v);
|
||||
OVERLOADABLE int as_int(uint v);
|
||||
OVERLOADABLE short2 as_short2(uint v);
|
||||
OVERLOADABLE ushort2 as_ushort2(uint v);
|
||||
OVERLOADABLE char3 as_char3(uint v);
|
||||
OVERLOADABLE char4 as_char4(uint v);
|
||||
OVERLOADABLE uchar3 as_uchar3(uint v);
|
||||
OVERLOADABLE uchar4 as_uchar4(uint v);
|
||||
OVERLOADABLE float as_float(uint v);
|
||||
OVERLOADABLE half2 as_half2(uint v);
|
||||
OVERLOADABLE int as_int(short2 v);
|
||||
OVERLOADABLE uint as_uint(short2 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(short2 v);
|
||||
OVERLOADABLE char3 as_char3(short2 v);
|
||||
OVERLOADABLE char4 as_char4(short2 v);
|
||||
OVERLOADABLE uchar3 as_uchar3(short2 v);
|
||||
OVERLOADABLE uchar4 as_uchar4(short2 v);
|
||||
OVERLOADABLE float as_float(short2 v);
|
||||
OVERLOADABLE half2 as_half2(short2 v);
|
||||
OVERLOADABLE int as_int(ushort2 v);
|
||||
OVERLOADABLE uint as_uint(ushort2 v);
|
||||
OVERLOADABLE short2 as_short2(ushort2 v);
|
||||
OVERLOADABLE char3 as_char3(ushort2 v);
|
||||
OVERLOADABLE char4 as_char4(ushort2 v);
|
||||
OVERLOADABLE uchar3 as_uchar3(ushort2 v);
|
||||
OVERLOADABLE uchar4 as_uchar4(ushort2 v);
|
||||
OVERLOADABLE float as_float(ushort2 v);
|
||||
OVERLOADABLE half2 as_half2(ushort2 v);
|
||||
OVERLOADABLE int as_int(char3 v);
|
||||
OVERLOADABLE uint as_uint(char3 v);
|
||||
OVERLOADABLE short2 as_short2(char3 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(char3 v);
|
||||
OVERLOADABLE uchar3 as_uchar3(char3 v);
|
||||
OVERLOADABLE uchar4 as_uchar4(char3 v);
|
||||
OVERLOADABLE float as_float(char3 v);
|
||||
OVERLOADABLE half2 as_half2(char3 v);
|
||||
OVERLOADABLE int as_int(char4 v);
|
||||
OVERLOADABLE uint as_uint(char4 v);
|
||||
OVERLOADABLE short2 as_short2(char4 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(char4 v);
|
||||
OVERLOADABLE uchar3 as_uchar3(char4 v);
|
||||
OVERLOADABLE uchar4 as_uchar4(char4 v);
|
||||
OVERLOADABLE float as_float(char4 v);
|
||||
OVERLOADABLE half2 as_half2(char4 v);
|
||||
OVERLOADABLE int as_int(uchar3 v);
|
||||
OVERLOADABLE uint as_uint(uchar3 v);
|
||||
OVERLOADABLE short2 as_short2(uchar3 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(uchar3 v);
|
||||
OVERLOADABLE char3 as_char3(uchar3 v);
|
||||
OVERLOADABLE char4 as_char4(uchar3 v);
|
||||
OVERLOADABLE float as_float(uchar3 v);
|
||||
OVERLOADABLE half2 as_half2(uchar3 v);
|
||||
OVERLOADABLE int as_int(uchar4 v);
|
||||
OVERLOADABLE uint as_uint(uchar4 v);
|
||||
OVERLOADABLE short2 as_short2(uchar4 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(uchar4 v);
|
||||
OVERLOADABLE char3 as_char3(uchar4 v);
|
||||
OVERLOADABLE char4 as_char4(uchar4 v);
|
||||
OVERLOADABLE float as_float(uchar4 v);
|
||||
OVERLOADABLE half2 as_half2(uchar4 v);
|
||||
OVERLOADABLE int as_int(float v);
|
||||
OVERLOADABLE uint as_uint(float v);
|
||||
OVERLOADABLE short2 as_short2(float v);
|
||||
OVERLOADABLE ushort2 as_ushort2(float v);
|
||||
OVERLOADABLE char3 as_char3(float v);
|
||||
OVERLOADABLE char4 as_char4(float v);
|
||||
OVERLOADABLE uchar3 as_uchar3(float v);
|
||||
OVERLOADABLE uchar4 as_uchar4(float v);
|
||||
OVERLOADABLE half2 as_half2(float v);
|
||||
OVERLOADABLE int as_int(half2 v);
|
||||
OVERLOADABLE uint as_uint(half2 v);
|
||||
OVERLOADABLE short2 as_short2(half2 v);
|
||||
OVERLOADABLE ushort2 as_ushort2(half2 v);
|
||||
OVERLOADABLE char3 as_char3(half2 v);
|
||||
OVERLOADABLE char4 as_char4(half2 v);
|
||||
OVERLOADABLE uchar3 as_uchar3(half2 v);
|
||||
OVERLOADABLE uchar4 as_uchar4(half2 v);
|
||||
OVERLOADABLE float as_float(half2 v);
|
||||
OVERLOADABLE ulong as_ulong(long v);
|
||||
OVERLOADABLE int2 as_int2(long v);
|
||||
OVERLOADABLE uint2 as_uint2(long v);
|
||||
OVERLOADABLE short3 as_short3(long v);
|
||||
OVERLOADABLE short4 as_short4(long v);
|
||||
OVERLOADABLE ushort3 as_ushort3(long v);
|
||||
OVERLOADABLE ushort4 as_ushort4(long v);
|
||||
OVERLOADABLE char8 as_char8(long v);
|
||||
OVERLOADABLE uchar8 as_uchar8(long v);
|
||||
OVERLOADABLE double as_double(long v);
|
||||
OVERLOADABLE float2 as_float2(long v);
|
||||
OVERLOADABLE half3 as_half3(long v);
|
||||
OVERLOADABLE half4 as_half4(long v);
|
||||
OVERLOADABLE long as_long(ulong v);
|
||||
OVERLOADABLE int2 as_int2(ulong v);
|
||||
OVERLOADABLE uint2 as_uint2(ulong v);
|
||||
OVERLOADABLE short3 as_short3(ulong v);
|
||||
OVERLOADABLE short4 as_short4(ulong v);
|
||||
OVERLOADABLE ushort3 as_ushort3(ulong v);
|
||||
OVERLOADABLE ushort4 as_ushort4(ulong v);
|
||||
OVERLOADABLE char8 as_char8(ulong v);
|
||||
OVERLOADABLE uchar8 as_uchar8(ulong v);
|
||||
OVERLOADABLE double as_double(ulong v);
|
||||
OVERLOADABLE float2 as_float2(ulong v);
|
||||
OVERLOADABLE half3 as_half3(ulong v);
|
||||
OVERLOADABLE half4 as_half4(ulong v);
|
||||
OVERLOADABLE long as_long(int2 v);
|
||||
OVERLOADABLE ulong as_ulong(int2 v);
|
||||
OVERLOADABLE uint2 as_uint2(int2 v);
|
||||
OVERLOADABLE short3 as_short3(int2 v);
|
||||
OVERLOADABLE short4 as_short4(int2 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(int2 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(int2 v);
|
||||
OVERLOADABLE char8 as_char8(int2 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(int2 v);
|
||||
OVERLOADABLE double as_double(int2 v);
|
||||
OVERLOADABLE float2 as_float2(int2 v);
|
||||
OVERLOADABLE half3 as_half3(int2 v);
|
||||
OVERLOADABLE half4 as_half4(int2 v);
|
||||
OVERLOADABLE long as_long(uint2 v);
|
||||
OVERLOADABLE ulong as_ulong(uint2 v);
|
||||
OVERLOADABLE int2 as_int2(uint2 v);
|
||||
OVERLOADABLE short3 as_short3(uint2 v);
|
||||
OVERLOADABLE short4 as_short4(uint2 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(uint2 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(uint2 v);
|
||||
OVERLOADABLE char8 as_char8(uint2 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(uint2 v);
|
||||
OVERLOADABLE double as_double(uint2 v);
|
||||
OVERLOADABLE float2 as_float2(uint2 v);
|
||||
OVERLOADABLE half3 as_half3(uint2 v);
|
||||
OVERLOADABLE half4 as_half4(uint2 v);
|
||||
OVERLOADABLE long as_long(short3 v);
|
||||
OVERLOADABLE ulong as_ulong(short3 v);
|
||||
OVERLOADABLE int2 as_int2(short3 v);
|
||||
OVERLOADABLE uint2 as_uint2(short3 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(short3 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(short3 v);
|
||||
OVERLOADABLE char8 as_char8(short3 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(short3 v);
|
||||
OVERLOADABLE double as_double(short3 v);
|
||||
OVERLOADABLE float2 as_float2(short3 v);
|
||||
OVERLOADABLE half3 as_half3(short3 v);
|
||||
OVERLOADABLE half4 as_half4(short3 v);
|
||||
OVERLOADABLE long as_long(short4 v);
|
||||
OVERLOADABLE ulong as_ulong(short4 v);
|
||||
OVERLOADABLE int2 as_int2(short4 v);
|
||||
OVERLOADABLE uint2 as_uint2(short4 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(short4 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(short4 v);
|
||||
OVERLOADABLE char8 as_char8(short4 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(short4 v);
|
||||
OVERLOADABLE double as_double(short4 v);
|
||||
OVERLOADABLE float2 as_float2(short4 v);
|
||||
OVERLOADABLE half3 as_half3(short4 v);
|
||||
OVERLOADABLE half4 as_half4(short4 v);
|
||||
OVERLOADABLE long as_long(ushort3 v);
|
||||
OVERLOADABLE ulong as_ulong(ushort3 v);
|
||||
OVERLOADABLE int2 as_int2(ushort3 v);
|
||||
OVERLOADABLE uint2 as_uint2(ushort3 v);
|
||||
OVERLOADABLE short3 as_short3(ushort3 v);
|
||||
OVERLOADABLE short4 as_short4(ushort3 v);
|
||||
OVERLOADABLE char8 as_char8(ushort3 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(ushort3 v);
|
||||
OVERLOADABLE double as_double(ushort3 v);
|
||||
OVERLOADABLE float2 as_float2(ushort3 v);
|
||||
OVERLOADABLE half3 as_half3(ushort3 v);
|
||||
OVERLOADABLE half4 as_half4(ushort3 v);
|
||||
OVERLOADABLE long as_long(ushort4 v);
|
||||
OVERLOADABLE ulong as_ulong(ushort4 v);
|
||||
OVERLOADABLE int2 as_int2(ushort4 v);
|
||||
OVERLOADABLE uint2 as_uint2(ushort4 v);
|
||||
OVERLOADABLE short3 as_short3(ushort4 v);
|
||||
OVERLOADABLE short4 as_short4(ushort4 v);
|
||||
OVERLOADABLE char8 as_char8(ushort4 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(ushort4 v);
|
||||
OVERLOADABLE double as_double(ushort4 v);
|
||||
OVERLOADABLE float2 as_float2(ushort4 v);
|
||||
OVERLOADABLE half3 as_half3(ushort4 v);
|
||||
OVERLOADABLE half4 as_half4(ushort4 v);
|
||||
OVERLOADABLE long as_long(char8 v);
|
||||
OVERLOADABLE ulong as_ulong(char8 v);
|
||||
OVERLOADABLE int2 as_int2(char8 v);
|
||||
OVERLOADABLE uint2 as_uint2(char8 v);
|
||||
OVERLOADABLE short3 as_short3(char8 v);
|
||||
OVERLOADABLE short4 as_short4(char8 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(char8 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(char8 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(char8 v);
|
||||
OVERLOADABLE double as_double(char8 v);
|
||||
OVERLOADABLE float2 as_float2(char8 v);
|
||||
OVERLOADABLE half3 as_half3(char8 v);
|
||||
OVERLOADABLE half4 as_half4(char8 v);
|
||||
OVERLOADABLE long as_long(uchar8 v);
|
||||
OVERLOADABLE ulong as_ulong(uchar8 v);
|
||||
OVERLOADABLE int2 as_int2(uchar8 v);
|
||||
OVERLOADABLE uint2 as_uint2(uchar8 v);
|
||||
OVERLOADABLE short3 as_short3(uchar8 v);
|
||||
OVERLOADABLE short4 as_short4(uchar8 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(uchar8 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(uchar8 v);
|
||||
OVERLOADABLE char8 as_char8(uchar8 v);
|
||||
OVERLOADABLE double as_double(uchar8 v);
|
||||
OVERLOADABLE float2 as_float2(uchar8 v);
|
||||
OVERLOADABLE half3 as_half3(uchar8 v);
|
||||
OVERLOADABLE half4 as_half4(uchar8 v);
|
||||
OVERLOADABLE long as_long(double v);
|
||||
OVERLOADABLE ulong as_ulong(double v);
|
||||
OVERLOADABLE int2 as_int2(double v);
|
||||
OVERLOADABLE uint2 as_uint2(double v);
|
||||
OVERLOADABLE short3 as_short3(double v);
|
||||
OVERLOADABLE short4 as_short4(double v);
|
||||
OVERLOADABLE ushort3 as_ushort3(double v);
|
||||
OVERLOADABLE ushort4 as_ushort4(double v);
|
||||
OVERLOADABLE char8 as_char8(double v);
|
||||
OVERLOADABLE uchar8 as_uchar8(double v);
|
||||
OVERLOADABLE float2 as_float2(double v);
|
||||
OVERLOADABLE half3 as_half3(double v);
|
||||
OVERLOADABLE half4 as_half4(double v);
|
||||
OVERLOADABLE long as_long(float2 v);
|
||||
OVERLOADABLE ulong as_ulong(float2 v);
|
||||
OVERLOADABLE int2 as_int2(float2 v);
|
||||
OVERLOADABLE uint2 as_uint2(float2 v);
|
||||
OVERLOADABLE short3 as_short3(float2 v);
|
||||
OVERLOADABLE short4 as_short4(float2 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(float2 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(float2 v);
|
||||
OVERLOADABLE char8 as_char8(float2 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(float2 v);
|
||||
OVERLOADABLE double as_double(float2 v);
|
||||
OVERLOADABLE half3 as_half3(float2 v);
|
||||
OVERLOADABLE half4 as_half4(float2 v);
|
||||
OVERLOADABLE long as_long(half3 v);
|
||||
OVERLOADABLE ulong as_ulong(half3 v);
|
||||
OVERLOADABLE int2 as_int2(half3 v);
|
||||
OVERLOADABLE uint2 as_uint2(half3 v);
|
||||
OVERLOADABLE short3 as_short3(half3 v);
|
||||
OVERLOADABLE short4 as_short4(half3 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(half3 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(half3 v);
|
||||
OVERLOADABLE char8 as_char8(half3 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(half3 v);
|
||||
OVERLOADABLE double as_double(half3 v);
|
||||
OVERLOADABLE float2 as_float2(half3 v);
|
||||
OVERLOADABLE long as_long(half4 v);
|
||||
OVERLOADABLE ulong as_ulong(half4 v);
|
||||
OVERLOADABLE int2 as_int2(half4 v);
|
||||
OVERLOADABLE uint2 as_uint2(half4 v);
|
||||
OVERLOADABLE short3 as_short3(half4 v);
|
||||
OVERLOADABLE short4 as_short4(half4 v);
|
||||
OVERLOADABLE ushort3 as_ushort3(half4 v);
|
||||
OVERLOADABLE ushort4 as_ushort4(half4 v);
|
||||
OVERLOADABLE char8 as_char8(half4 v);
|
||||
OVERLOADABLE uchar8 as_uchar8(half4 v);
|
||||
OVERLOADABLE double as_double(half4 v);
|
||||
OVERLOADABLE float2 as_float2(half4 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(long2 v);
|
||||
OVERLOADABLE int3 as_int3(long2 v);
|
||||
OVERLOADABLE int4 as_int4(long2 v);
|
||||
OVERLOADABLE uint3 as_uint3(long2 v);
|
||||
OVERLOADABLE uint4 as_uint4(long2 v);
|
||||
OVERLOADABLE short8 as_short8(long2 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(long2 v);
|
||||
OVERLOADABLE char16 as_char16(long2 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(long2 v);
|
||||
OVERLOADABLE double2 as_double2(long2 v);
|
||||
OVERLOADABLE float3 as_float3(long2 v);
|
||||
OVERLOADABLE float4 as_float4(long2 v);
|
||||
OVERLOADABLE half8 as_half8(long2 v);
|
||||
OVERLOADABLE long2 as_long2(ulong2 v);
|
||||
OVERLOADABLE int3 as_int3(ulong2 v);
|
||||
OVERLOADABLE int4 as_int4(ulong2 v);
|
||||
OVERLOADABLE uint3 as_uint3(ulong2 v);
|
||||
OVERLOADABLE uint4 as_uint4(ulong2 v);
|
||||
OVERLOADABLE short8 as_short8(ulong2 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(ulong2 v);
|
||||
OVERLOADABLE char16 as_char16(ulong2 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(ulong2 v);
|
||||
OVERLOADABLE double2 as_double2(ulong2 v);
|
||||
OVERLOADABLE float3 as_float3(ulong2 v);
|
||||
OVERLOADABLE float4 as_float4(ulong2 v);
|
||||
OVERLOADABLE half8 as_half8(ulong2 v);
|
||||
OVERLOADABLE long2 as_long2(int3 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(int3 v);
|
||||
OVERLOADABLE uint3 as_uint3(int3 v);
|
||||
OVERLOADABLE uint4 as_uint4(int3 v);
|
||||
OVERLOADABLE short8 as_short8(int3 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(int3 v);
|
||||
OVERLOADABLE char16 as_char16(int3 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(int3 v);
|
||||
OVERLOADABLE double2 as_double2(int3 v);
|
||||
OVERLOADABLE float3 as_float3(int3 v);
|
||||
OVERLOADABLE float4 as_float4(int3 v);
|
||||
OVERLOADABLE half8 as_half8(int3 v);
|
||||
OVERLOADABLE long2 as_long2(int4 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(int4 v);
|
||||
OVERLOADABLE uint3 as_uint3(int4 v);
|
||||
OVERLOADABLE uint4 as_uint4(int4 v);
|
||||
OVERLOADABLE short8 as_short8(int4 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(int4 v);
|
||||
OVERLOADABLE char16 as_char16(int4 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(int4 v);
|
||||
OVERLOADABLE double2 as_double2(int4 v);
|
||||
OVERLOADABLE float3 as_float3(int4 v);
|
||||
OVERLOADABLE float4 as_float4(int4 v);
|
||||
OVERLOADABLE half8 as_half8(int4 v);
|
||||
OVERLOADABLE long2 as_long2(uint3 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(uint3 v);
|
||||
OVERLOADABLE int3 as_int3(uint3 v);
|
||||
OVERLOADABLE int4 as_int4(uint3 v);
|
||||
OVERLOADABLE short8 as_short8(uint3 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(uint3 v);
|
||||
OVERLOADABLE char16 as_char16(uint3 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(uint3 v);
|
||||
OVERLOADABLE double2 as_double2(uint3 v);
|
||||
OVERLOADABLE float3 as_float3(uint3 v);
|
||||
OVERLOADABLE float4 as_float4(uint3 v);
|
||||
OVERLOADABLE half8 as_half8(uint3 v);
|
||||
OVERLOADABLE long2 as_long2(uint4 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(uint4 v);
|
||||
OVERLOADABLE int3 as_int3(uint4 v);
|
||||
OVERLOADABLE int4 as_int4(uint4 v);
|
||||
OVERLOADABLE short8 as_short8(uint4 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(uint4 v);
|
||||
OVERLOADABLE char16 as_char16(uint4 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(uint4 v);
|
||||
OVERLOADABLE double2 as_double2(uint4 v);
|
||||
OVERLOADABLE float3 as_float3(uint4 v);
|
||||
OVERLOADABLE float4 as_float4(uint4 v);
|
||||
OVERLOADABLE half8 as_half8(uint4 v);
|
||||
OVERLOADABLE long2 as_long2(short8 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(short8 v);
|
||||
OVERLOADABLE int3 as_int3(short8 v);
|
||||
OVERLOADABLE int4 as_int4(short8 v);
|
||||
OVERLOADABLE uint3 as_uint3(short8 v);
|
||||
OVERLOADABLE uint4 as_uint4(short8 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(short8 v);
|
||||
OVERLOADABLE char16 as_char16(short8 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(short8 v);
|
||||
OVERLOADABLE double2 as_double2(short8 v);
|
||||
OVERLOADABLE float3 as_float3(short8 v);
|
||||
OVERLOADABLE float4 as_float4(short8 v);
|
||||
OVERLOADABLE half8 as_half8(short8 v);
|
||||
OVERLOADABLE long2 as_long2(ushort8 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(ushort8 v);
|
||||
OVERLOADABLE int3 as_int3(ushort8 v);
|
||||
OVERLOADABLE int4 as_int4(ushort8 v);
|
||||
OVERLOADABLE uint3 as_uint3(ushort8 v);
|
||||
OVERLOADABLE uint4 as_uint4(ushort8 v);
|
||||
OVERLOADABLE short8 as_short8(ushort8 v);
|
||||
OVERLOADABLE char16 as_char16(ushort8 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(ushort8 v);
|
||||
OVERLOADABLE double2 as_double2(ushort8 v);
|
||||
OVERLOADABLE float3 as_float3(ushort8 v);
|
||||
OVERLOADABLE float4 as_float4(ushort8 v);
|
||||
OVERLOADABLE half8 as_half8(ushort8 v);
|
||||
OVERLOADABLE long2 as_long2(char16 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(char16 v);
|
||||
OVERLOADABLE int3 as_int3(char16 v);
|
||||
OVERLOADABLE int4 as_int4(char16 v);
|
||||
OVERLOADABLE uint3 as_uint3(char16 v);
|
||||
OVERLOADABLE uint4 as_uint4(char16 v);
|
||||
OVERLOADABLE short8 as_short8(char16 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(char16 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(char16 v);
|
||||
OVERLOADABLE double2 as_double2(char16 v);
|
||||
OVERLOADABLE float3 as_float3(char16 v);
|
||||
OVERLOADABLE float4 as_float4(char16 v);
|
||||
OVERLOADABLE half8 as_half8(char16 v);
|
||||
OVERLOADABLE long2 as_long2(uchar16 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(uchar16 v);
|
||||
OVERLOADABLE int3 as_int3(uchar16 v);
|
||||
OVERLOADABLE int4 as_int4(uchar16 v);
|
||||
OVERLOADABLE uint3 as_uint3(uchar16 v);
|
||||
OVERLOADABLE uint4 as_uint4(uchar16 v);
|
||||
OVERLOADABLE short8 as_short8(uchar16 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(uchar16 v);
|
||||
OVERLOADABLE char16 as_char16(uchar16 v);
|
||||
OVERLOADABLE double2 as_double2(uchar16 v);
|
||||
OVERLOADABLE float3 as_float3(uchar16 v);
|
||||
OVERLOADABLE float4 as_float4(uchar16 v);
|
||||
OVERLOADABLE half8 as_half8(uchar16 v);
|
||||
OVERLOADABLE long2 as_long2(double2 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(double2 v);
|
||||
OVERLOADABLE int3 as_int3(double2 v);
|
||||
OVERLOADABLE int4 as_int4(double2 v);
|
||||
OVERLOADABLE uint3 as_uint3(double2 v);
|
||||
OVERLOADABLE uint4 as_uint4(double2 v);
|
||||
OVERLOADABLE short8 as_short8(double2 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(double2 v);
|
||||
OVERLOADABLE char16 as_char16(double2 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(double2 v);
|
||||
OVERLOADABLE float3 as_float3(double2 v);
|
||||
OVERLOADABLE float4 as_float4(double2 v);
|
||||
OVERLOADABLE half8 as_half8(double2 v);
|
||||
OVERLOADABLE long2 as_long2(float3 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(float3 v);
|
||||
OVERLOADABLE int3 as_int3(float3 v);
|
||||
OVERLOADABLE int4 as_int4(float3 v);
|
||||
OVERLOADABLE uint3 as_uint3(float3 v);
|
||||
OVERLOADABLE uint4 as_uint4(float3 v);
|
||||
OVERLOADABLE short8 as_short8(float3 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(float3 v);
|
||||
OVERLOADABLE char16 as_char16(float3 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(float3 v);
|
||||
OVERLOADABLE double2 as_double2(float3 v);
|
||||
OVERLOADABLE half8 as_half8(float3 v);
|
||||
OVERLOADABLE long2 as_long2(float4 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(float4 v);
|
||||
OVERLOADABLE int3 as_int3(float4 v);
|
||||
OVERLOADABLE int4 as_int4(float4 v);
|
||||
OVERLOADABLE uint3 as_uint3(float4 v);
|
||||
OVERLOADABLE uint4 as_uint4(float4 v);
|
||||
OVERLOADABLE short8 as_short8(float4 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(float4 v);
|
||||
OVERLOADABLE char16 as_char16(float4 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(float4 v);
|
||||
OVERLOADABLE double2 as_double2(float4 v);
|
||||
OVERLOADABLE half8 as_half8(float4 v);
|
||||
OVERLOADABLE long2 as_long2(half8 v);
|
||||
OVERLOADABLE ulong2 as_ulong2(half8 v);
|
||||
OVERLOADABLE int3 as_int3(half8 v);
|
||||
OVERLOADABLE int4 as_int4(half8 v);
|
||||
OVERLOADABLE uint3 as_uint3(half8 v);
|
||||
OVERLOADABLE uint4 as_uint4(half8 v);
|
||||
OVERLOADABLE short8 as_short8(half8 v);
|
||||
OVERLOADABLE ushort8 as_ushort8(half8 v);
|
||||
OVERLOADABLE char16 as_char16(half8 v);
|
||||
OVERLOADABLE uchar16 as_uchar16(half8 v);
|
||||
OVERLOADABLE double2 as_double2(half8 v);
|
||||
OVERLOADABLE float3 as_float3(half8 v);
|
||||
OVERLOADABLE float4 as_float4(half8 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(long3 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(long3 v);
|
||||
OVERLOADABLE int8 as_int8(long3 v);
|
||||
OVERLOADABLE uint8 as_uint8(long3 v);
|
||||
OVERLOADABLE short16 as_short16(long3 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(long3 v);
|
||||
OVERLOADABLE double3 as_double3(long3 v);
|
||||
OVERLOADABLE double4 as_double4(long3 v);
|
||||
OVERLOADABLE float8 as_float8(long3 v);
|
||||
OVERLOADABLE half16 as_half16(long3 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(long4 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(long4 v);
|
||||
OVERLOADABLE int8 as_int8(long4 v);
|
||||
OVERLOADABLE uint8 as_uint8(long4 v);
|
||||
OVERLOADABLE short16 as_short16(long4 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(long4 v);
|
||||
OVERLOADABLE double3 as_double3(long4 v);
|
||||
OVERLOADABLE double4 as_double4(long4 v);
|
||||
OVERLOADABLE float8 as_float8(long4 v);
|
||||
OVERLOADABLE half16 as_half16(long4 v);
|
||||
OVERLOADABLE long3 as_long3(ulong3 v);
|
||||
OVERLOADABLE long4 as_long4(ulong3 v);
|
||||
OVERLOADABLE int8 as_int8(ulong3 v);
|
||||
OVERLOADABLE uint8 as_uint8(ulong3 v);
|
||||
OVERLOADABLE short16 as_short16(ulong3 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(ulong3 v);
|
||||
OVERLOADABLE double3 as_double3(ulong3 v);
|
||||
OVERLOADABLE double4 as_double4(ulong3 v);
|
||||
OVERLOADABLE float8 as_float8(ulong3 v);
|
||||
OVERLOADABLE half16 as_half16(ulong3 v);
|
||||
OVERLOADABLE long3 as_long3(ulong4 v);
|
||||
OVERLOADABLE long4 as_long4(ulong4 v);
|
||||
OVERLOADABLE int8 as_int8(ulong4 v);
|
||||
OVERLOADABLE uint8 as_uint8(ulong4 v);
|
||||
OVERLOADABLE short16 as_short16(ulong4 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(ulong4 v);
|
||||
OVERLOADABLE double3 as_double3(ulong4 v);
|
||||
OVERLOADABLE double4 as_double4(ulong4 v);
|
||||
OVERLOADABLE float8 as_float8(ulong4 v);
|
||||
OVERLOADABLE half16 as_half16(ulong4 v);
|
||||
OVERLOADABLE long3 as_long3(int8 v);
|
||||
OVERLOADABLE long4 as_long4(int8 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(int8 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(int8 v);
|
||||
OVERLOADABLE uint8 as_uint8(int8 v);
|
||||
OVERLOADABLE short16 as_short16(int8 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(int8 v);
|
||||
OVERLOADABLE double3 as_double3(int8 v);
|
||||
OVERLOADABLE double4 as_double4(int8 v);
|
||||
OVERLOADABLE float8 as_float8(int8 v);
|
||||
OVERLOADABLE half16 as_half16(int8 v);
|
||||
OVERLOADABLE long3 as_long3(uint8 v);
|
||||
OVERLOADABLE long4 as_long4(uint8 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(uint8 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(uint8 v);
|
||||
OVERLOADABLE int8 as_int8(uint8 v);
|
||||
OVERLOADABLE short16 as_short16(uint8 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(uint8 v);
|
||||
OVERLOADABLE double3 as_double3(uint8 v);
|
||||
OVERLOADABLE double4 as_double4(uint8 v);
|
||||
OVERLOADABLE float8 as_float8(uint8 v);
|
||||
OVERLOADABLE half16 as_half16(uint8 v);
|
||||
OVERLOADABLE long3 as_long3(short16 v);
|
||||
OVERLOADABLE long4 as_long4(short16 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(short16 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(short16 v);
|
||||
OVERLOADABLE int8 as_int8(short16 v);
|
||||
OVERLOADABLE uint8 as_uint8(short16 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(short16 v);
|
||||
OVERLOADABLE double3 as_double3(short16 v);
|
||||
OVERLOADABLE double4 as_double4(short16 v);
|
||||
OVERLOADABLE float8 as_float8(short16 v);
|
||||
OVERLOADABLE half16 as_half16(short16 v);
|
||||
OVERLOADABLE long3 as_long3(ushort16 v);
|
||||
OVERLOADABLE long4 as_long4(ushort16 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(ushort16 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(ushort16 v);
|
||||
OVERLOADABLE int8 as_int8(ushort16 v);
|
||||
OVERLOADABLE uint8 as_uint8(ushort16 v);
|
||||
OVERLOADABLE short16 as_short16(ushort16 v);
|
||||
OVERLOADABLE double3 as_double3(ushort16 v);
|
||||
OVERLOADABLE double4 as_double4(ushort16 v);
|
||||
OVERLOADABLE float8 as_float8(ushort16 v);
|
||||
OVERLOADABLE half16 as_half16(ushort16 v);
|
||||
OVERLOADABLE long3 as_long3(double3 v);
|
||||
OVERLOADABLE long4 as_long4(double3 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(double3 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(double3 v);
|
||||
OVERLOADABLE int8 as_int8(double3 v);
|
||||
OVERLOADABLE uint8 as_uint8(double3 v);
|
||||
OVERLOADABLE short16 as_short16(double3 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(double3 v);
|
||||
OVERLOADABLE float8 as_float8(double3 v);
|
||||
OVERLOADABLE half16 as_half16(double3 v);
|
||||
OVERLOADABLE long3 as_long3(double4 v);
|
||||
OVERLOADABLE long4 as_long4(double4 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(double4 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(double4 v);
|
||||
OVERLOADABLE int8 as_int8(double4 v);
|
||||
OVERLOADABLE uint8 as_uint8(double4 v);
|
||||
OVERLOADABLE short16 as_short16(double4 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(double4 v);
|
||||
OVERLOADABLE float8 as_float8(double4 v);
|
||||
OVERLOADABLE half16 as_half16(double4 v);
|
||||
OVERLOADABLE long3 as_long3(float8 v);
|
||||
OVERLOADABLE long4 as_long4(float8 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(float8 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(float8 v);
|
||||
OVERLOADABLE int8 as_int8(float8 v);
|
||||
OVERLOADABLE uint8 as_uint8(float8 v);
|
||||
OVERLOADABLE short16 as_short16(float8 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(float8 v);
|
||||
OVERLOADABLE double3 as_double3(float8 v);
|
||||
OVERLOADABLE double4 as_double4(float8 v);
|
||||
OVERLOADABLE half16 as_half16(float8 v);
|
||||
OVERLOADABLE long3 as_long3(half16 v);
|
||||
OVERLOADABLE long4 as_long4(half16 v);
|
||||
OVERLOADABLE ulong3 as_ulong3(half16 v);
|
||||
OVERLOADABLE ulong4 as_ulong4(half16 v);
|
||||
OVERLOADABLE int8 as_int8(half16 v);
|
||||
OVERLOADABLE uint8 as_uint8(half16 v);
|
||||
OVERLOADABLE short16 as_short16(half16 v);
|
||||
OVERLOADABLE ushort16 as_ushort16(half16 v);
|
||||
OVERLOADABLE double3 as_double3(half16 v);
|
||||
OVERLOADABLE double4 as_double4(half16 v);
|
||||
OVERLOADABLE float8 as_float8(half16 v);
|
||||
OVERLOADABLE ulong8 as_ulong8(long8 v);
|
||||
OVERLOADABLE int16 as_int16(long8 v);
|
||||
OVERLOADABLE uint16 as_uint16(long8 v);
|
||||
OVERLOADABLE double8 as_double8(long8 v);
|
||||
OVERLOADABLE float16 as_float16(long8 v);
|
||||
OVERLOADABLE long8 as_long8(ulong8 v);
|
||||
OVERLOADABLE int16 as_int16(ulong8 v);
|
||||
OVERLOADABLE uint16 as_uint16(ulong8 v);
|
||||
OVERLOADABLE double8 as_double8(ulong8 v);
|
||||
OVERLOADABLE float16 as_float16(ulong8 v);
|
||||
OVERLOADABLE long8 as_long8(int16 v);
|
||||
OVERLOADABLE ulong8 as_ulong8(int16 v);
|
||||
OVERLOADABLE uint16 as_uint16(int16 v);
|
||||
OVERLOADABLE double8 as_double8(int16 v);
|
||||
OVERLOADABLE float16 as_float16(int16 v);
|
||||
OVERLOADABLE long8 as_long8(uint16 v);
|
||||
OVERLOADABLE ulong8 as_ulong8(uint16 v);
|
||||
OVERLOADABLE int16 as_int16(uint16 v);
|
||||
OVERLOADABLE double8 as_double8(uint16 v);
|
||||
OVERLOADABLE float16 as_float16(uint16 v);
|
||||
OVERLOADABLE long8 as_long8(double8 v);
|
||||
OVERLOADABLE ulong8 as_ulong8(double8 v);
|
||||
OVERLOADABLE int16 as_int16(double8 v);
|
||||
OVERLOADABLE uint16 as_uint16(double8 v);
|
||||
OVERLOADABLE float16 as_float16(double8 v);
|
||||
OVERLOADABLE long8 as_long8(float16 v);
|
||||
OVERLOADABLE ulong8 as_ulong8(float16 v);
|
||||
OVERLOADABLE int16 as_int16(float16 v);
|
||||
OVERLOADABLE uint16 as_uint16(float16 v);
|
||||
OVERLOADABLE double8 as_double8(float16 v);
|
||||
OVERLOADABLE ulong16 as_ulong16(long16 v);
|
||||
OVERLOADABLE double16 as_double16(long16 v);
|
||||
OVERLOADABLE long16 as_long16(ulong16 v);
|
||||
OVERLOADABLE double16 as_double16(ulong16 v);
|
||||
OVERLOADABLE long16 as_long16(double16 v);
|
||||
OVERLOADABLE ulong16 as_ulong16(double16 v);
|
||||
#endif /* __OCL_AS_H__ */
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_ASYNC_H__
|
||||
#define __OCL_ASYNC_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
#define DEFN(TYPE) \
|
||||
OVERLOADABLE event_t async_work_group_copy (local TYPE *dst, const global TYPE *src, \
|
||||
size_t num, event_t event); \
|
||||
OVERLOADABLE event_t async_work_group_copy (global TYPE *dst, const local TYPE *src, \
|
||||
size_t num, event_t event); \
|
||||
OVERLOADABLE event_t async_work_group_strided_copy (local TYPE *dst, const global TYPE *src, \
|
||||
size_t num, size_t src_stride, event_t event); \
|
||||
OVERLOADABLE event_t async_work_group_strided_copy (global TYPE *dst, const local TYPE *src, \
|
||||
size_t num, size_t dst_stride, event_t event); \
|
||||
|
||||
#define DEF(TYPE) \
|
||||
DEFN(TYPE); DEFN(TYPE##2); DEFN(TYPE##3); DEFN(TYPE##4); DEFN(TYPE##8); DEFN(TYPE##16);
|
||||
DEF(char)
|
||||
DEF(uchar)
|
||||
DEF(short)
|
||||
DEF(ushort)
|
||||
DEF(int)
|
||||
DEF(uint)
|
||||
DEF(long)
|
||||
DEF(ulong)
|
||||
DEF(float)
|
||||
DEF(double)
|
||||
#undef DEFN
|
||||
#undef DEF
|
||||
|
||||
OVERLOADABLE void wait_group_events (int num_events, event_t *event_list);
|
||||
|
||||
#define DEFN(TYPE) \
|
||||
OVERLOADABLE void prefetch(const global TYPE *p, size_t num);
|
||||
#define DEF(TYPE) \
|
||||
DEFN(TYPE); DEFN(TYPE##2); DEFN(TYPE##3); DEFN(TYPE##4); DEFN(TYPE##8); DEFN(TYPE##16)
|
||||
DEF(char);
|
||||
DEF(uchar);
|
||||
DEF(short);
|
||||
DEF(ushort);
|
||||
DEF(int);
|
||||
DEF(uint);
|
||||
DEF(long);
|
||||
DEF(ulong);
|
||||
DEF(float);
|
||||
DEF(double);
|
||||
#undef DEFN
|
||||
#undef DEF
|
||||
|
||||
#endif
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_ATOM_H__
|
||||
#define __OCL_ATOM_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Atomic functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OVERLOADABLE uint atomic_add(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_add(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_add(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_add(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_sub(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_sub(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_sub(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_sub(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_and(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_and(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_and(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_and(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_or(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_or(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_or(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_or(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_xor(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_xor(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_xor(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_xor(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_xchg(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_xchg(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_xchg(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_xchg(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE int atomic_min(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_min(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE int atomic_max(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_max(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_min(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_min(volatile __local uint *p, uint val);
|
||||
|
||||
OVERLOADABLE uint atomic_max(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_max(volatile __local uint *p, uint val);
|
||||
|
||||
OVERLOADABLE float atomic_xchg (volatile __global float *p, float val);
|
||||
OVERLOADABLE float atomic_xchg (volatile __local float *p, float val);
|
||||
|
||||
OVERLOADABLE uint atomic_inc (volatile __global uint *p);
|
||||
OVERLOADABLE uint atomic_inc (volatile __local uint *p);
|
||||
OVERLOADABLE int atomic_inc (volatile __global int *p);
|
||||
OVERLOADABLE int atomic_inc (volatile __local int *p);
|
||||
|
||||
OVERLOADABLE uint atomic_dec (volatile __global uint *p);
|
||||
OVERLOADABLE uint atomic_dec (volatile __local uint *p);
|
||||
OVERLOADABLE int atomic_dec (volatile __global int *p);
|
||||
OVERLOADABLE int atomic_dec (volatile __local int *p);
|
||||
|
||||
OVERLOADABLE uint atomic_cmpxchg (volatile __global uint *p, uint cmp, uint val);
|
||||
OVERLOADABLE uint atomic_cmpxchg (volatile __local uint *p, uint cmp, uint val);
|
||||
OVERLOADABLE int atomic_cmpxchg (volatile __global int *p, int cmp, int val);
|
||||
OVERLOADABLE int atomic_cmpxchg (volatile __local int *p, int cmp, int val);
|
||||
|
||||
|
||||
// XXX for conformance test
|
||||
// The following atom_xxx api is on OpenCL spec 1.0.
|
||||
#define atom_add atomic_add
|
||||
#define atom_sub atomic_sub
|
||||
#define atom_and atomic_and
|
||||
#define atom_or atomic_or
|
||||
#define atom_xor atomic_xor
|
||||
#define atom_xchg atomic_xchg
|
||||
#define atom_min atomic_min
|
||||
#define atom_max atomic_max
|
||||
#define atom_inc atomic_inc
|
||||
#define atom_dec atomic_dec
|
||||
#define atom_cmpxchg atomic_cmpxchg
|
||||
|
||||
|
||||
#endif /* __OCL_ATOM_H__ */
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_ATOM20_H__
|
||||
#define __OCL_ATOM20_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Atomic functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OVERLOADABLE uint atomic_add(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_add(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_add(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_add(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_sub(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_sub(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_sub(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_sub(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_and(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_and(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_and(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_and(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_or(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_or(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_or(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_or(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_xor(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_xor(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_xor(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_xor(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_xchg(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_xchg(volatile __local uint *p, uint val);
|
||||
OVERLOADABLE int atomic_xchg(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_xchg(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE int atomic_min(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_min(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE int atomic_max(volatile __global int *p, int val);
|
||||
OVERLOADABLE int atomic_max(volatile __local int *p, int val);
|
||||
|
||||
OVERLOADABLE uint atomic_min(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_min(volatile __local uint *p, uint val);
|
||||
|
||||
OVERLOADABLE uint atomic_max(volatile __global uint *p, uint val);
|
||||
OVERLOADABLE uint atomic_max(volatile __local uint *p, uint val);
|
||||
|
||||
OVERLOADABLE float atomic_xchg (volatile __global float *p, float val);
|
||||
OVERLOADABLE float atomic_xchg (volatile __local float *p, float val);
|
||||
|
||||
OVERLOADABLE uint atomic_inc (volatile __global uint *p);
|
||||
OVERLOADABLE uint atomic_inc (volatile __local uint *p);
|
||||
OVERLOADABLE int atomic_inc (volatile __global int *p);
|
||||
OVERLOADABLE int atomic_inc (volatile __local int *p);
|
||||
|
||||
OVERLOADABLE uint atomic_dec (volatile __global uint *p);
|
||||
OVERLOADABLE uint atomic_dec (volatile __local uint *p);
|
||||
OVERLOADABLE int atomic_dec (volatile __global int *p);
|
||||
OVERLOADABLE int atomic_dec (volatile __local int *p);
|
||||
|
||||
OVERLOADABLE uint atomic_cmpxchg (volatile __global uint *p, uint cmp, uint val);
|
||||
OVERLOADABLE uint atomic_cmpxchg (volatile __local uint *p, uint cmp, uint val);
|
||||
OVERLOADABLE int atomic_cmpxchg (volatile __global int *p, int cmp, int val);
|
||||
OVERLOADABLE int atomic_cmpxchg (volatile __local int *p, int cmp, int val);
|
||||
|
||||
|
||||
// XXX for conformance test
|
||||
// The following atom_xxx api is on OpenCL spec 1.0.
|
||||
#define atom_add atomic_add
|
||||
#define atom_sub atomic_sub
|
||||
#define atom_and atomic_and
|
||||
#define atom_or atomic_or
|
||||
#define atom_xor atomic_xor
|
||||
#define atom_xchg atomic_xchg
|
||||
#define atom_min atomic_min
|
||||
#define atom_max atomic_max
|
||||
#define atom_inc atomic_inc
|
||||
#define atom_dec atomic_dec
|
||||
#define atom_cmpxchg atomic_cmpxchg
|
||||
|
||||
//OpenCL 2.0 features
|
||||
#define ATOMIC_GEN_FUNCTIONS(ATYPE, CTYPE, POSTFIX) \
|
||||
CTYPE __gen_ocl_atomic_exchange##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_add##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_sub##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_or##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_xor##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_and##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_imin##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_umin##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_imax##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope); \
|
||||
CTYPE __gen_ocl_atomic_fetch_umax##POSTFIX(volatile ATYPE *p, CTYPE val, int order, int scope);\
|
||||
CTYPE __gen_ocl_atomic_compare_exchange_strong##POSTFIX(volatile ATYPE* object, CTYPE expected, CTYPE desired, int sucess, int failure, int scope); \
|
||||
CTYPE __gen_ocl_atomic_compare_exchange_weak##POSTFIX(volatile ATYPE* object, CTYPE expected, CTYPE desired, int sucess, int failure, int scope);
|
||||
|
||||
ATOMIC_GEN_FUNCTIONS(atomic_int, int, 32)
|
||||
#ifndef DISABLE_ATOMIC_INT64
|
||||
ATOMIC_GEN_FUNCTIONS(atomic_long, long, 64)
|
||||
#endif
|
||||
float __gen_ocl_atomic_exchangef(volatile atomic_int *p, float val, int order, int scope);
|
||||
float __gen_ocl_atomic_fetch_addf(volatile atomic_int *p, float val, int order, int scope);
|
||||
|
||||
#undef ATOMIC_GEN_FUNCTIONS
|
||||
|
||||
/* only used to initialize global address space */
|
||||
//#define ATOMIC_VAR_INIT(C value)
|
||||
#define ATOMIC_VAR_INIT
|
||||
#define ATOMIC_FLAG_INIT 0
|
||||
|
||||
//store
|
||||
#define ATOMIC_FUNCTIONS(ATYPE, CTYPE, MTYPE1, MTYPE2) \
|
||||
OVERLOADABLE void atomic_init(volatile ATYPE *object, CTYPE desired); \
|
||||
OVERLOADABLE void atomic_store(volatile ATYPE *object, CTYPE desired); \
|
||||
OVERLOADABLE void atomic_store_explicit(volatile ATYPE *object, CTYPE desired, memory_order order); \
|
||||
OVERLOADABLE void atomic_store_explicit(volatile ATYPE *object, CTYPE desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_load(volatile ATYPE *object); \
|
||||
OVERLOADABLE CTYPE atomic_load_explicit(volatile ATYPE *object, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_load_explicit(volatile ATYPE *object, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_exchange(volatile ATYPE *object, CTYPE desired); \
|
||||
OVERLOADABLE CTYPE atomic_exchange_explicit(volatile ATYPE *object, CTYPE desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_exchange_explicit(volatile ATYPE *object, CTYPE desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_strong(volatile ATYPE *object, CTYPE *expected, CTYPE desired); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_strong_explicit(volatile ATYPE *object, CTYPE *expected, CTYPE desired, memory_order success, memory_order failure); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_strong_explicit(volatile ATYPE *object, CTYPE *expected, CTYPE desired, memory_order success, memory_order failure, memory_scope scope); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_weak(volatile ATYPE *object, CTYPE *expected, CTYPE desired); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_weak_explicit(volatile ATYPE *object, CTYPE *expected, CTYPE desired, memory_order success, memory_order failure); \
|
||||
OVERLOADABLE bool atomic_compare_exchange_weak_explicit(volatile ATYPE *object, CTYPE *expected, CTYPE desired, memory_order success, memory_order failure, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_add(volatile ATYPE *object, MTYPE1 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_add_explicit(volatile ATYPE *object, MTYPE1 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_add_explicit(volatile ATYPE *object, MTYPE1 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_sub(volatile ATYPE *object, MTYPE1 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_sub_explicit(volatile ATYPE *object, MTYPE1 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_sub_explicit(volatile ATYPE *object, MTYPE1 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_or(volatile ATYPE *object, MTYPE2 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_or_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_or_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_xor(volatile ATYPE *object, MTYPE2 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_xor_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_xor_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_and(volatile ATYPE *object, MTYPE2 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_and_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_and_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_min(volatile ATYPE *object, MTYPE2 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_min_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_min_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order, memory_scope scope); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_max(volatile ATYPE *object, MTYPE2 desired); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_max_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order); \
|
||||
OVERLOADABLE CTYPE atomic_fetch_max_explicit(volatile ATYPE *object, MTYPE2 desired, memory_order order, memory_scope scope);
|
||||
|
||||
ATOMIC_FUNCTIONS(atomic_int, int, int, int)
|
||||
ATOMIC_FUNCTIONS(atomic_uint, uint, uint, uint)
|
||||
#ifndef DISABLE_ATOMIC_INT64
|
||||
ATOMIC_FUNCTIONS(atomic_long, long, long, long)
|
||||
ATOMIC_FUNCTIONS(atomic_ulong, ulong, ulong, ulong)
|
||||
#endif
|
||||
ATOMIC_FUNCTIONS(atomic_float, float, float, float)
|
||||
#undef ATOMIC_FUNCTIONS
|
||||
|
||||
|
||||
OVERLOADABLE bool atomic_flag_test_and_set(volatile atomic_flag *object);
|
||||
OVERLOADABLE bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order);
|
||||
OVERLOADABLE bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope);
|
||||
OVERLOADABLE void atomic_flag_clear(volatile atomic_flag *object);
|
||||
OVERLOADABLE void atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order);
|
||||
OVERLOADABLE void atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order, memory_scope scope);
|
||||
|
||||
OVERLOADABLE void atomic_work_item_fence(cl_mem_fence_flags flags, memory_order order, memory_scope scope);
|
||||
#endif /* __OCL_ATOM20_H__ */
|
||||
@@ -1,370 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_COMMON_H__
|
||||
#define __OCL_COMMON_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Common Functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
OVERLOADABLE float step(float edge, float x);
|
||||
OVERLOADABLE float max(float a, float b);
|
||||
OVERLOADABLE float min(float a, float b);
|
||||
OVERLOADABLE float mix(float x, float y, float a);
|
||||
OVERLOADABLE float clamp(float v, float l, float u);
|
||||
|
||||
OVERLOADABLE float degrees(float radians);
|
||||
OVERLOADABLE float radians(float degrees);
|
||||
OVERLOADABLE float smoothstep(float e0, float e1, float x);
|
||||
|
||||
OVERLOADABLE float sign(float x);
|
||||
|
||||
// Half half version.
|
||||
OVERLOADABLE half step(half edge, half x);
|
||||
OVERLOADABLE half max(half a, half b);
|
||||
OVERLOADABLE half min(half a, half b);
|
||||
OVERLOADABLE half mix(half x, half y, half a);
|
||||
OVERLOADABLE half clamp(half v, half l, half u);
|
||||
|
||||
OVERLOADABLE half degrees(half radians);
|
||||
OVERLOADABLE half radians(half degrees);
|
||||
OVERLOADABLE half smoothstep(half e0, half e1, half x);
|
||||
|
||||
OVERLOADABLE half sign(half x);
|
||||
|
||||
OVERLOADABLE double step(double edge, double x);
|
||||
OVERLOADABLE double max(double a, double b);
|
||||
OVERLOADABLE double min(double a, double b);
|
||||
OVERLOADABLE double mix(double x, double y, double a);
|
||||
OVERLOADABLE double clamp(double v, double l, double u);
|
||||
OVERLOADABLE double degrees(double radians);
|
||||
OVERLOADABLE double radians(double degrees);
|
||||
OVERLOADABLE double smoothstep(double e0, double e1, double x);
|
||||
OVERLOADABLE double sign(double x);
|
||||
|
||||
//Begin from this part is autogenerated.
|
||||
//Don't modify it manually.
|
||||
//common builtin functions
|
||||
//gentype clamp (gentype x, gentype minval, gentype maxval)
|
||||
|
||||
OVERLOADABLE float2 clamp (float2 param0, float2 param1, float2 param2);
|
||||
OVERLOADABLE float3 clamp (float3 param0, float3 param1, float3 param2);
|
||||
OVERLOADABLE float4 clamp (float4 param0, float4 param1, float4 param2);
|
||||
OVERLOADABLE float8 clamp (float8 param0, float8 param1, float8 param2);
|
||||
OVERLOADABLE float16 clamp (float16 param0, float16 param1, float16 param2);
|
||||
OVERLOADABLE double2 clamp (double2 param0, double2 param1, double2 param2);
|
||||
OVERLOADABLE double3 clamp (double3 param0, double3 param1, double3 param2);
|
||||
OVERLOADABLE double4 clamp (double4 param0, double4 param1, double4 param2);
|
||||
OVERLOADABLE double8 clamp (double8 param0, double8 param1, double8 param2);
|
||||
OVERLOADABLE double16 clamp (double16 param0, double16 param1, double16 param2);
|
||||
OVERLOADABLE half2 clamp (half2 param0, half2 param1, half2 param2);
|
||||
OVERLOADABLE half3 clamp (half3 param0, half3 param1, half3 param2);
|
||||
OVERLOADABLE half4 clamp (half4 param0, half4 param1, half4 param2);
|
||||
OVERLOADABLE half8 clamp (half8 param0, half8 param1, half8 param2);
|
||||
OVERLOADABLE half16 clamp (half16 param0, half16 param1, half16 param2);
|
||||
|
||||
//gentypef clamp (gentypef x, float minval, float maxval)
|
||||
|
||||
OVERLOADABLE float2 clamp (float2 param0, float param1, float param2);
|
||||
OVERLOADABLE float3 clamp (float3 param0, float param1, float param2);
|
||||
OVERLOADABLE float4 clamp (float4 param0, float param1, float param2);
|
||||
OVERLOADABLE float8 clamp (float8 param0, float param1, float param2);
|
||||
OVERLOADABLE float16 clamp (float16 param0, float param1, float param2);
|
||||
|
||||
//gentypeh clamp (gentypeh x, half minval, half maxval)
|
||||
|
||||
OVERLOADABLE half2 clamp (half2 param0, half param1, half param2);
|
||||
OVERLOADABLE half3 clamp (half3 param0, half param1, half param2);
|
||||
OVERLOADABLE half4 clamp (half4 param0, half param1, half param2);
|
||||
OVERLOADABLE half8 clamp (half8 param0, half param1, half param2);
|
||||
OVERLOADABLE half16 clamp (half16 param0, half param1, half param2);
|
||||
|
||||
//gentyped clamp (gentyped x, double minval, double maxval)
|
||||
|
||||
OVERLOADABLE double2 clamp (double2 param0, double param1, double param2);
|
||||
OVERLOADABLE double3 clamp (double3 param0, double param1, double param2);
|
||||
OVERLOADABLE double4 clamp (double4 param0, double param1, double param2);
|
||||
OVERLOADABLE double8 clamp (double8 param0, double param1, double param2);
|
||||
OVERLOADABLE double16 clamp (double16 param0, double param1, double param2);
|
||||
|
||||
//gentype degrees (gentype radians)
|
||||
|
||||
OVERLOADABLE float2 degrees (float2 param0);
|
||||
OVERLOADABLE float3 degrees (float3 param0);
|
||||
OVERLOADABLE float4 degrees (float4 param0);
|
||||
OVERLOADABLE float8 degrees (float8 param0);
|
||||
OVERLOADABLE float16 degrees (float16 param0);
|
||||
OVERLOADABLE double2 degrees (double2 param0);
|
||||
OVERLOADABLE double3 degrees (double3 param0);
|
||||
OVERLOADABLE double4 degrees (double4 param0);
|
||||
OVERLOADABLE double8 degrees (double8 param0);
|
||||
OVERLOADABLE double16 degrees (double16 param0);
|
||||
OVERLOADABLE half2 degrees (half2 param0);
|
||||
OVERLOADABLE half3 degrees (half3 param0);
|
||||
OVERLOADABLE half4 degrees (half4 param0);
|
||||
OVERLOADABLE half8 degrees (half8 param0);
|
||||
OVERLOADABLE half16 degrees (half16 param0);
|
||||
|
||||
//gentype max (gentype x, gentype y)
|
||||
|
||||
OVERLOADABLE float2 max (float2 param0, float2 param1);
|
||||
OVERLOADABLE float3 max (float3 param0, float3 param1);
|
||||
OVERLOADABLE float4 max (float4 param0, float4 param1);
|
||||
OVERLOADABLE float8 max (float8 param0, float8 param1);
|
||||
OVERLOADABLE float16 max (float16 param0, float16 param1);
|
||||
OVERLOADABLE double2 max (double2 param0, double2 param1);
|
||||
OVERLOADABLE double3 max (double3 param0, double3 param1);
|
||||
OVERLOADABLE double4 max (double4 param0, double4 param1);
|
||||
OVERLOADABLE double8 max (double8 param0, double8 param1);
|
||||
OVERLOADABLE double16 max (double16 param0, double16 param1);
|
||||
OVERLOADABLE half2 max (half2 param0, half2 param1);
|
||||
OVERLOADABLE half3 max (half3 param0, half3 param1);
|
||||
OVERLOADABLE half4 max (half4 param0, half4 param1);
|
||||
OVERLOADABLE half8 max (half8 param0, half8 param1);
|
||||
OVERLOADABLE half16 max (half16 param0, half16 param1);
|
||||
|
||||
//gentypef max (gentypef x, float y)
|
||||
|
||||
OVERLOADABLE float2 max (float2 param0, float param1);
|
||||
OVERLOADABLE float3 max (float3 param0, float param1);
|
||||
OVERLOADABLE float4 max (float4 param0, float param1);
|
||||
OVERLOADABLE float8 max (float8 param0, float param1);
|
||||
OVERLOADABLE float16 max (float16 param0, float param1);
|
||||
|
||||
//gentypeh max (gentypeh x, half y)
|
||||
|
||||
OVERLOADABLE half2 max (half2 param0, half param1);
|
||||
OVERLOADABLE half3 max (half3 param0, half param1);
|
||||
OVERLOADABLE half4 max (half4 param0, half param1);
|
||||
OVERLOADABLE half8 max (half8 param0, half param1);
|
||||
OVERLOADABLE half16 max (half16 param0, half param1);
|
||||
|
||||
//gentyped max (gentyped x, double y)
|
||||
|
||||
OVERLOADABLE double2 max (double2 param0, double param1);
|
||||
OVERLOADABLE double3 max (double3 param0, double param1);
|
||||
OVERLOADABLE double4 max (double4 param0, double param1);
|
||||
OVERLOADABLE double8 max (double8 param0, double param1);
|
||||
OVERLOADABLE double16 max (double16 param0, double param1);
|
||||
|
||||
//gentype min (gentype x, gentype y)
|
||||
|
||||
OVERLOADABLE float2 min (float2 param0, float2 param1);
|
||||
OVERLOADABLE float3 min (float3 param0, float3 param1);
|
||||
OVERLOADABLE float4 min (float4 param0, float4 param1);
|
||||
OVERLOADABLE float8 min (float8 param0, float8 param1);
|
||||
OVERLOADABLE float16 min (float16 param0, float16 param1);
|
||||
OVERLOADABLE double2 min (double2 param0, double2 param1);
|
||||
OVERLOADABLE double3 min (double3 param0, double3 param1);
|
||||
OVERLOADABLE double4 min (double4 param0, double4 param1);
|
||||
OVERLOADABLE double8 min (double8 param0, double8 param1);
|
||||
OVERLOADABLE double16 min (double16 param0, double16 param1);
|
||||
OVERLOADABLE half2 min (half2 param0, half2 param1);
|
||||
OVERLOADABLE half3 min (half3 param0, half3 param1);
|
||||
OVERLOADABLE half4 min (half4 param0, half4 param1);
|
||||
OVERLOADABLE half8 min (half8 param0, half8 param1);
|
||||
OVERLOADABLE half16 min (half16 param0, half16 param1);
|
||||
|
||||
//gentypef min (gentypef x, float y)
|
||||
|
||||
OVERLOADABLE float2 min (float2 param0, float param1);
|
||||
OVERLOADABLE float3 min (float3 param0, float param1);
|
||||
OVERLOADABLE float4 min (float4 param0, float param1);
|
||||
OVERLOADABLE float8 min (float8 param0, float param1);
|
||||
OVERLOADABLE float16 min (float16 param0, float param1);
|
||||
|
||||
//gentypeh min (gentypeh x, half y)
|
||||
|
||||
OVERLOADABLE half2 min (half2 param0, half param1);
|
||||
OVERLOADABLE half3 min (half3 param0, half param1);
|
||||
OVERLOADABLE half4 min (half4 param0, half param1);
|
||||
OVERLOADABLE half8 min (half8 param0, half param1);
|
||||
OVERLOADABLE half16 min (half16 param0, half param1);
|
||||
|
||||
//gentyped min (gentyped x, double y)
|
||||
|
||||
OVERLOADABLE double2 min (double2 param0, double param1);
|
||||
OVERLOADABLE double3 min (double3 param0, double param1);
|
||||
OVERLOADABLE double4 min (double4 param0, double param1);
|
||||
OVERLOADABLE double8 min (double8 param0, double param1);
|
||||
OVERLOADABLE double16 min (double16 param0, double param1);
|
||||
|
||||
//gentype mix (gentype x, gentype y, gentype a)
|
||||
|
||||
OVERLOADABLE float2 mix (float2 param0, float2 param1, float2 param2);
|
||||
OVERLOADABLE float3 mix (float3 param0, float3 param1, float3 param2);
|
||||
OVERLOADABLE float4 mix (float4 param0, float4 param1, float4 param2);
|
||||
OVERLOADABLE float8 mix (float8 param0, float8 param1, float8 param2);
|
||||
OVERLOADABLE float16 mix (float16 param0, float16 param1, float16 param2);
|
||||
OVERLOADABLE double2 mix (double2 param0, double2 param1, double2 param2);
|
||||
OVERLOADABLE double3 mix (double3 param0, double3 param1, double3 param2);
|
||||
OVERLOADABLE double4 mix (double4 param0, double4 param1, double4 param2);
|
||||
OVERLOADABLE double8 mix (double8 param0, double8 param1, double8 param2);
|
||||
OVERLOADABLE double16 mix (double16 param0, double16 param1, double16 param2);
|
||||
OVERLOADABLE half2 mix (half2 param0, half2 param1, half2 param2);
|
||||
OVERLOADABLE half3 mix (half3 param0, half3 param1, half3 param2);
|
||||
OVERLOADABLE half4 mix (half4 param0, half4 param1, half4 param2);
|
||||
OVERLOADABLE half8 mix (half8 param0, half8 param1, half8 param2);
|
||||
OVERLOADABLE half16 mix (half16 param0, half16 param1, half16 param2);
|
||||
|
||||
//gentypef mix (gentypef x, gentypef y, float a)
|
||||
|
||||
OVERLOADABLE float2 mix (float2 param0, float2 param1, float param2);
|
||||
OVERLOADABLE float3 mix (float3 param0, float3 param1, float param2);
|
||||
OVERLOADABLE float4 mix (float4 param0, float4 param1, float param2);
|
||||
OVERLOADABLE float8 mix (float8 param0, float8 param1, float param2);
|
||||
OVERLOADABLE float16 mix (float16 param0, float16 param1, float param2);
|
||||
|
||||
//gentypeh mix (gentypeh x, gentypeh y, half a)
|
||||
|
||||
OVERLOADABLE half2 mix (half2 param0, half2 param1, half param2);
|
||||
OVERLOADABLE half3 mix (half3 param0, half3 param1, half param2);
|
||||
OVERLOADABLE half4 mix (half4 param0, half4 param1, half param2);
|
||||
OVERLOADABLE half8 mix (half8 param0, half8 param1, half param2);
|
||||
OVERLOADABLE half16 mix (half16 param0, half16 param1, half param2);
|
||||
|
||||
//gentyped mix (gentyped x, gentyped y, double a)
|
||||
|
||||
OVERLOADABLE double2 mix (double2 param0, double2 param1, double param2);
|
||||
OVERLOADABLE double3 mix (double3 param0, double3 param1, double param2);
|
||||
OVERLOADABLE double4 mix (double4 param0, double4 param1, double param2);
|
||||
OVERLOADABLE double8 mix (double8 param0, double8 param1, double param2);
|
||||
OVERLOADABLE double16 mix (double16 param0, double16 param1, double param2);
|
||||
|
||||
//gentype radians (gentype degrees)
|
||||
|
||||
OVERLOADABLE float2 radians (float2 param0);
|
||||
OVERLOADABLE float3 radians (float3 param0);
|
||||
OVERLOADABLE float4 radians (float4 param0);
|
||||
OVERLOADABLE float8 radians (float8 param0);
|
||||
OVERLOADABLE float16 radians (float16 param0);
|
||||
OVERLOADABLE double2 radians (double2 param0);
|
||||
OVERLOADABLE double3 radians (double3 param0);
|
||||
OVERLOADABLE double4 radians (double4 param0);
|
||||
OVERLOADABLE double8 radians (double8 param0);
|
||||
OVERLOADABLE double16 radians (double16 param0);
|
||||
OVERLOADABLE half2 radians (half2 param0);
|
||||
OVERLOADABLE half3 radians (half3 param0);
|
||||
OVERLOADABLE half4 radians (half4 param0);
|
||||
OVERLOADABLE half8 radians (half8 param0);
|
||||
OVERLOADABLE half16 radians (half16 param0);
|
||||
|
||||
//gentype step (gentype edge, gentype x)
|
||||
|
||||
OVERLOADABLE float2 step (float2 param0, float2 param1);
|
||||
OVERLOADABLE float3 step (float3 param0, float3 param1);
|
||||
OVERLOADABLE float4 step (float4 param0, float4 param1);
|
||||
OVERLOADABLE float8 step (float8 param0, float8 param1);
|
||||
OVERLOADABLE float16 step (float16 param0, float16 param1);
|
||||
OVERLOADABLE double2 step (double2 param0, double2 param1);
|
||||
OVERLOADABLE double3 step (double3 param0, double3 param1);
|
||||
OVERLOADABLE double4 step (double4 param0, double4 param1);
|
||||
OVERLOADABLE double8 step (double8 param0, double8 param1);
|
||||
OVERLOADABLE double16 step (double16 param0, double16 param1);
|
||||
OVERLOADABLE half2 step (half2 param0, half2 param1);
|
||||
OVERLOADABLE half3 step (half3 param0, half3 param1);
|
||||
OVERLOADABLE half4 step (half4 param0, half4 param1);
|
||||
OVERLOADABLE half8 step (half8 param0, half8 param1);
|
||||
OVERLOADABLE half16 step (half16 param0, half16 param1);
|
||||
|
||||
//gentypef step (float edge, gentypef x)
|
||||
|
||||
OVERLOADABLE float2 step (float param0, float2 param1);
|
||||
OVERLOADABLE float3 step (float param0, float3 param1);
|
||||
OVERLOADABLE float4 step (float param0, float4 param1);
|
||||
OVERLOADABLE float8 step (float param0, float8 param1);
|
||||
OVERLOADABLE float16 step (float param0, float16 param1);
|
||||
|
||||
//gentypeh step (half edge, gentypeh x)
|
||||
|
||||
OVERLOADABLE half2 step (half param0, half2 param1);
|
||||
OVERLOADABLE half3 step (half param0, half3 param1);
|
||||
OVERLOADABLE half4 step (half param0, half4 param1);
|
||||
OVERLOADABLE half8 step (half param0, half8 param1);
|
||||
OVERLOADABLE half16 step (half param0, half16 param1);
|
||||
|
||||
//gentyped step (double edge, gentyped x)
|
||||
|
||||
OVERLOADABLE double2 step (double param0, double2 param1);
|
||||
OVERLOADABLE double3 step (double param0, double3 param1);
|
||||
OVERLOADABLE double4 step (double param0, double4 param1);
|
||||
OVERLOADABLE double8 step (double param0, double8 param1);
|
||||
OVERLOADABLE double16 step (double param0, double16 param1);
|
||||
|
||||
//gentype smoothstep (gentype edge0, gentype edge1, gentype x)
|
||||
|
||||
OVERLOADABLE float2 smoothstep (float2 param0, float2 param1, float2 param2);
|
||||
OVERLOADABLE float3 smoothstep (float3 param0, float3 param1, float3 param2);
|
||||
OVERLOADABLE float4 smoothstep (float4 param0, float4 param1, float4 param2);
|
||||
OVERLOADABLE float8 smoothstep (float8 param0, float8 param1, float8 param2);
|
||||
OVERLOADABLE float16 smoothstep (float16 param0, float16 param1, float16 param2);
|
||||
OVERLOADABLE double2 smoothstep (double2 param0, double2 param1, double2 param2);
|
||||
OVERLOADABLE double3 smoothstep (double3 param0, double3 param1, double3 param2);
|
||||
OVERLOADABLE double4 smoothstep (double4 param0, double4 param1, double4 param2);
|
||||
OVERLOADABLE double8 smoothstep (double8 param0, double8 param1, double8 param2);
|
||||
OVERLOADABLE double16 smoothstep (double16 param0, double16 param1, double16 param2);
|
||||
OVERLOADABLE half2 smoothstep (half2 param0, half2 param1, half2 param2);
|
||||
OVERLOADABLE half3 smoothstep (half3 param0, half3 param1, half3 param2);
|
||||
OVERLOADABLE half4 smoothstep (half4 param0, half4 param1, half4 param2);
|
||||
OVERLOADABLE half8 smoothstep (half8 param0, half8 param1, half8 param2);
|
||||
OVERLOADABLE half16 smoothstep (half16 param0, half16 param1, half16 param2);
|
||||
|
||||
//gentypef smoothstep (float edge0, float edge1, gentypef x)
|
||||
|
||||
OVERLOADABLE float2 smoothstep (float param0, float param1, float2 param2);
|
||||
OVERLOADABLE float3 smoothstep (float param0, float param1, float3 param2);
|
||||
OVERLOADABLE float4 smoothstep (float param0, float param1, float4 param2);
|
||||
OVERLOADABLE float8 smoothstep (float param0, float param1, float8 param2);
|
||||
OVERLOADABLE float16 smoothstep (float param0, float param1, float16 param2);
|
||||
|
||||
//gentypeh smoothstep (half edge0, half edge1, gentypeh x)
|
||||
|
||||
OVERLOADABLE half2 smoothstep (half param0, half param1, half2 param2);
|
||||
OVERLOADABLE half3 smoothstep (half param0, half param1, half3 param2);
|
||||
OVERLOADABLE half4 smoothstep (half param0, half param1, half4 param2);
|
||||
OVERLOADABLE half8 smoothstep (half param0, half param1, half8 param2);
|
||||
OVERLOADABLE half16 smoothstep (half param0, half param1, half16 param2);
|
||||
|
||||
//gentyped smoothstep (double edge0, double edge1, gentyped x)
|
||||
|
||||
OVERLOADABLE double2 smoothstep (double param0, double param1, double2 param2);
|
||||
OVERLOADABLE double3 smoothstep (double param0, double param1, double3 param2);
|
||||
OVERLOADABLE double4 smoothstep (double param0, double param1, double4 param2);
|
||||
OVERLOADABLE double8 smoothstep (double param0, double param1, double8 param2);
|
||||
OVERLOADABLE double16 smoothstep (double param0, double param1, double16 param2);
|
||||
|
||||
//gentype sign (gentype x)
|
||||
|
||||
OVERLOADABLE float2 sign (float2 param0);
|
||||
OVERLOADABLE float3 sign (float3 param0);
|
||||
OVERLOADABLE float4 sign (float4 param0);
|
||||
OVERLOADABLE float8 sign (float8 param0);
|
||||
OVERLOADABLE float16 sign (float16 param0);
|
||||
OVERLOADABLE double2 sign (double2 param0);
|
||||
OVERLOADABLE double3 sign (double3 param0);
|
||||
OVERLOADABLE double4 sign (double4 param0);
|
||||
OVERLOADABLE double8 sign (double8 param0);
|
||||
OVERLOADABLE double16 sign (double16 param0);
|
||||
OVERLOADABLE half2 sign (half2 param0);
|
||||
OVERLOADABLE half3 sign (half3 param0);
|
||||
OVERLOADABLE half4 sign (half4 param0);
|
||||
OVERLOADABLE half8 sign (half8 param0);
|
||||
OVERLOADABLE half16 sign (half16 param0);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,170 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_COMMON_DEF_H__
|
||||
#define __OCL_COMMON_DEF_H__
|
||||
|
||||
#define __CL_VERSION_1_0__ 100
|
||||
#define __CL_VERSION_1_1__ 110
|
||||
#define __CL_VERSION_1_2__ 120
|
||||
#define CL_VERSION_1_0 100
|
||||
#define CL_VERSION_1_1 110
|
||||
#define CL_VERSION_1_2 120
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
#define __OPENCL_VERSION__ 200
|
||||
#define CL_VERSION_2_0 200
|
||||
#elif (__OPENCL_C_VERSION__ >= 300)
|
||||
/* OpenCL C 3.0 with none of the optional 2.0 features: the 1.2 library */
|
||||
#define __OPENCL_VERSION__ 300
|
||||
#define CL_VERSION_2_0 200
|
||||
#define CL_VERSION_3_0 300
|
||||
#else
|
||||
#define __OPENCL_VERSION__ 120
|
||||
#endif
|
||||
#define __ENDIAN_LITTLE__ 1
|
||||
#define __IMAGE_SUPPORT__ 1
|
||||
#define __kernel_exec(X, TYPE) __kernel __attribute__((work_group_size_hint(X,1,1))) \
|
||||
__attribute__((vec_type_hint(TYPE)))
|
||||
#define kernel_exec(X, TYPE) __kernel_exec(X, TYPE)
|
||||
|
||||
#endif /* end of __OCL_COMMON_DEF_H__ */
|
||||
// This file includes defines that are common to both kernel code and
|
||||
// the NVPTX back-end.
|
||||
#ifndef __OCL_COMMON_DEFINES__
|
||||
#define __OCL_COMMON_DEFINES__
|
||||
//
|
||||
// Common defines for Image intrinsics
|
||||
// Channel order
|
||||
#define CLK_HAS_ALPHA(color) (color == CLK_A || color == CLK_RA || color == CLK_RGBA || color == CLK_BGRA || color == CLK_ARGB || color == CLK_sRGBA || color == CLK_sBGRA)
|
||||
enum {
|
||||
CLK_R = 0x10B0,
|
||||
CLK_A = 0x10B1,
|
||||
CLK_RG = 0x10B2,
|
||||
CLK_RA = 0x10B3,
|
||||
CLK_RGB = 0x10B4,
|
||||
CLK_RGBA = 0x10B5,
|
||||
CLK_BGRA = 0x10B6,
|
||||
CLK_ARGB = 0x10B7,
|
||||
|
||||
#if (__NV_CL_C_VERSION == __NV_CL_C_VERSION_1_0)
|
||||
CLK_xRGB = 0x10B7,
|
||||
#endif
|
||||
|
||||
CLK_INTENSITY = 0x10B8,
|
||||
CLK_LUMINANCE = 0x10B9
|
||||
|
||||
#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
|
||||
,
|
||||
CLK_Rx = 0x10BA,
|
||||
CLK_RGx = 0x10BB,
|
||||
CLK_RGBx = 0x10BC
|
||||
#endif
|
||||
#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_2_0)
|
||||
,
|
||||
CLK_sRGBA = 0x10C1,
|
||||
CLK_sBGRA = 0x10C2
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
typedef enum clk_channel_type {
|
||||
// valid formats for float return types
|
||||
CLK_SNORM_INT8 = 0x10D0, // four channel RGBA unorm8
|
||||
CLK_SNORM_INT16 = 0x10D1, // four channel RGBA unorm16
|
||||
CLK_UNORM_INT8 = 0x10D2, // four channel RGBA unorm8
|
||||
CLK_UNORM_INT16 = 0x10D3, // four channel RGBA unorm16
|
||||
CLK_HALF_FLOAT = 0x10DD, // four channel RGBA half
|
||||
CLK_FLOAT = 0x10DE, // four channel RGBA float
|
||||
|
||||
#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
|
||||
CLK_UNORM_SHORT_565 = 0x10D4,
|
||||
CLK_UNORM_SHORT_555 = 0x10D5,
|
||||
CLK_UNORM_INT_101010 = 0x10D6,
|
||||
#endif
|
||||
|
||||
// valid only for integer return types
|
||||
CLK_SIGNED_INT8 = 0x10D7,
|
||||
CLK_SIGNED_INT16 = 0x10D8,
|
||||
CLK_SIGNED_INT32 = 0x10D9,
|
||||
CLK_UNSIGNED_INT8 = 0x10DA,
|
||||
CLK_UNSIGNED_INT16 = 0x10DB,
|
||||
CLK_UNSIGNED_INT32 = 0x10DC,
|
||||
|
||||
// CI SPI for CPU
|
||||
__CLK_UNORM_INT8888 , // four channel ARGB unorm8
|
||||
__CLK_UNORM_INT8888R, // four channel BGRA unorm8
|
||||
|
||||
__CLK_VALID_IMAGE_TYPE_COUNT,
|
||||
__CLK_INVALID_IMAGE_TYPE = __CLK_VALID_IMAGE_TYPE_COUNT,
|
||||
__CLK_VALID_IMAGE_TYPE_MASK_BITS = 4, // number of bits required to
|
||||
// represent any image type
|
||||
__CLK_VALID_IMAGE_TYPE_MASK = ( 1 << __CLK_VALID_IMAGE_TYPE_MASK_BITS ) - 1
|
||||
}clk_channel_type;
|
||||
|
||||
typedef enum clk_sampler_type {
|
||||
__CLK_NORMALIZED_BASE = 0,
|
||||
CLK_NORMALIZED_COORDS_FALSE = 0,
|
||||
CLK_NORMALIZED_COORDS_TRUE = (1 << __CLK_NORMALIZED_BASE),
|
||||
__CLK_NORMALIZED_MASK = (CLK_NORMALIZED_COORDS_FALSE |
|
||||
CLK_NORMALIZED_COORDS_TRUE),
|
||||
__CLK_NORMALIZED_BITS = 1, // number of bits required to
|
||||
// represent normalization
|
||||
__CLK_ADDRESS_BASE = 0,
|
||||
CLK_ADDRESS_NONE = (0 << __CLK_ADDRESS_BASE),
|
||||
CLK_ADDRESS_CLAMP_TO_EDGE = (2 << __CLK_ADDRESS_BASE),
|
||||
CLK_ADDRESS_CLAMP = (4 << __CLK_ADDRESS_BASE),
|
||||
CLK_ADDRESS_REPEAT = (6 << __CLK_ADDRESS_BASE),
|
||||
CLK_ADDRESS_MIRROR = (8 << __CLK_ADDRESS_BASE),
|
||||
|
||||
#if (__NV_CL_C_VERSION >= __NV_CL_C_VERSION_1_1)
|
||||
CLK_ADDRESS_MIRRORED_REPEAT = CLK_ADDRESS_MIRROR,
|
||||
#endif
|
||||
__CLK_ADDRESS_MASK = (CLK_ADDRESS_NONE | CLK_ADDRESS_CLAMP |
|
||||
CLK_ADDRESS_CLAMP_TO_EDGE |
|
||||
CLK_ADDRESS_REPEAT | CLK_ADDRESS_MIRROR),
|
||||
__CLK_ADDRESS_BITS = 4, // number of bits required to
|
||||
// represent address info
|
||||
__CLK_FILTER_BASE = (__CLK_ADDRESS_BASE + __CLK_ADDRESS_BITS),
|
||||
CLK_FILTER_ANISOTROPIC = (0 << __CLK_FILTER_BASE),
|
||||
CLK_FILTER_NEAREST = (1 << __CLK_FILTER_BASE),
|
||||
CLK_FILTER_LINEAR = (2 << __CLK_FILTER_BASE),
|
||||
__CLK_FILTER_MASK = (CLK_FILTER_NEAREST | CLK_FILTER_LINEAR |
|
||||
CLK_FILTER_ANISOTROPIC),
|
||||
__CLK_FILTER_BITS = 2, // number of bits required to
|
||||
// represent address info
|
||||
|
||||
__CLK_MIP_BASE = (__CLK_FILTER_BASE + __CLK_FILTER_BITS),
|
||||
CLK_MIP_NEAREST = (0 << __CLK_MIP_BASE),
|
||||
CLK_MIP_LINEAR = (1 << __CLK_MIP_BASE),
|
||||
CLK_MIP_ANISOTROPIC = (2 << __CLK_MIP_BASE),
|
||||
__CLK_MIP_MASK = (CLK_MIP_NEAREST | CLK_MIP_LINEAR |
|
||||
CLK_MIP_ANISOTROPIC),
|
||||
__CLK_MIP_BITS = 2,
|
||||
|
||||
__CLK_SAMPLER_BITS = (__CLK_MIP_BASE + __CLK_MIP_BITS),
|
||||
__CLK_SAMPLER_MASK = (__CLK_MIP_MASK | __CLK_FILTER_MASK |
|
||||
__CLK_NORMALIZED_MASK | __CLK_ADDRESS_MASK),
|
||||
|
||||
__CLK_SAMPLER_ARG_BASE = (__CLK_MIP_BASE + __CLK_SAMPLER_BITS),
|
||||
__CLK_SAMPLER_ARG_BITS = 8,
|
||||
__CLK_SAMPLER_ARG_MASK = (((1 << __CLK_SAMPLER_ARG_BITS) - 1) << __CLK_SAMPLER_ARG_BASE),
|
||||
__CLK_SAMPLER_ARG_KEY_BIT = (1 << (__CLK_SAMPLER_ARG_BASE + __CLK_SAMPLER_ARG_BITS)),
|
||||
__CLK_SAMPLER_ARG_KEY_BITS = 1,
|
||||
|
||||
} clk_sampler_type;
|
||||
|
||||
#endif /* __OCL_COMMON_DEFINES__ */
|
||||
@@ -1,101 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __OCL_ENQUEUE_H__
|
||||
#define __OCL_ENQUEUE_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
#define CLK_ENQUEUE_FLAGS_WAIT_KERNEL 0
|
||||
#define CLK_ENQUEUE_FLAGS_NO_WAIT 1
|
||||
#define CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP 2
|
||||
#define CLK_SUCCESS 0
|
||||
#define CL_COMPLETE 0
|
||||
#define CLK_PROFILING_COMMAND_EXEC_TIME 0
|
||||
|
||||
struct ndrange_info_t {
|
||||
int type;
|
||||
int global_work_size[3];
|
||||
int local_work_size[3];
|
||||
int global_work_offset[3];
|
||||
};
|
||||
|
||||
struct Block_literal {
|
||||
void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock
|
||||
int flags;
|
||||
int reserved;
|
||||
__global void* invoke;
|
||||
struct Block_descriptor_1 {
|
||||
unsigned long int reserved; // NULL
|
||||
unsigned long int size; // sizeof(struct Block_literal_1)
|
||||
// optional helper functions
|
||||
void *copy_helper; // IFF (1<<25)
|
||||
void *dispose_helper; // IFF (1<<25)
|
||||
// required ABI.2010.3.16
|
||||
const char *signature; // IFF (1<<30)
|
||||
} *descriptor;
|
||||
// imported variables
|
||||
};
|
||||
|
||||
#if __clang_major__*10 + __clang_minor__ >= 50
|
||||
typedef struct ndrange_info_t ndrange_t;
|
||||
#endif
|
||||
|
||||
#if __clang_major__*10 + __clang_minor__ >= 50
|
||||
#define BLOCK_TYPE void*
|
||||
#else
|
||||
#define BLOCK_TYPE __private void*
|
||||
#endif
|
||||
|
||||
#if __clang_major__*10 + __clang_minor__ >= 40
|
||||
#define EVENT_TYPE clk_event_t*
|
||||
#else
|
||||
#define EVENT_TYPE __private clk_event_t*
|
||||
#endif
|
||||
|
||||
clk_event_t create_user_event(void);
|
||||
void retain_event(clk_event_t event);
|
||||
void release_event(clk_event_t event);
|
||||
void set_user_event_status(clk_event_t event, int status);
|
||||
bool is_valid_event(clk_event_t event);
|
||||
void capture_event_profiling_info(clk_event_t event, int name, global void *value);
|
||||
|
||||
uint __get_kernel_work_group_size_impl(BLOCK_TYPE block);
|
||||
uint __get_kernel_preferred_work_group_multiple_impl(BLOCK_TYPE block);
|
||||
|
||||
int __enqueue_kernel_basic(queue_t q, int flag, ndrange_t ndrange, BLOCK_TYPE block);
|
||||
int __enqueue_kernel_basic_events(queue_t q, int flag, ndrange_t ndrange,
|
||||
uint num_events_in_wait_list, const EVENT_TYPE event_wait_list,
|
||||
EVENT_TYPE event_ret, BLOCK_TYPE block);
|
||||
|
||||
queue_t get_default_queue(void);
|
||||
int __gen_enqueue_kernel_slm(queue_t q, int flag, ndrange_t ndrange, BLOCK_TYPE block, int count, __private int* slm_sizes);
|
||||
|
||||
OVERLOADABLE ndrange_t ndrange_1D(size_t global_work_size);
|
||||
OVERLOADABLE ndrange_t ndrange_1D(size_t global_work_size, size_t local_work_size);
|
||||
OVERLOADABLE ndrange_t ndrange_1D(size_t global_work_offset, size_t global_work_size, size_t local_work_size);
|
||||
|
||||
OVERLOADABLE ndrange_t ndrange_2D(const size_t global_work_size[2]);
|
||||
OVERLOADABLE ndrange_t ndrange_2D(const size_t global_work_size[2], const size_t local_work_size[2]);
|
||||
OVERLOADABLE ndrange_t ndrange_2D(const size_t global_work_offset[2], const size_t global_work_size[2], const size_t local_work_size[2]);
|
||||
|
||||
OVERLOADABLE ndrange_t ndrange_3D(const size_t global_work_size[3]);
|
||||
OVERLOADABLE ndrange_t ndrange_3D(const size_t global_work_size[3], const size_t local_work_size[3]);
|
||||
OVERLOADABLE ndrange_t ndrange_3D(const size_t global_work_offset[3], const size_t global_work_size[3], const size_t local_work_size[3]);
|
||||
|
||||
int enqueue_marker (queue_t queue, uint num_events_in_wait_list, const clk_event_t *event_wait_list, clk_event_t *event_ret);
|
||||
#endif
|
||||
@@ -1,117 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_FLOAT_H__
|
||||
#define __OCL_FLOAT_H__
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL floating-point macros and pragmas
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MAX_10_EXP +38
|
||||
#define FLT_MAX_EXP +128
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MIN_EXP -125
|
||||
#define FLT_RADIX 2
|
||||
#define FLT_ONE 1.0000000000e+00 /* 0x3F800000 */
|
||||
#define FLT_MAX 0x1.fffffep127f
|
||||
#define FLT_MIN 0x1.0p-126f
|
||||
#define FLT_EPSILON 0x1.0p-23f
|
||||
|
||||
#define MAXFLOAT 3.40282347e38F
|
||||
INLINE_OVERLOADABLE float __ocl_inff(void) {
|
||||
union { uint u; float f; } u;
|
||||
u.u = 0x7F800000;
|
||||
return u.f;
|
||||
}
|
||||
INLINE_OVERLOADABLE float __ocl_nanf(void) {
|
||||
union { uint u; float f; } u;
|
||||
u.u = 0x7F800001;
|
||||
return u.f;
|
||||
}
|
||||
typedef union
|
||||
{
|
||||
float value;
|
||||
uint word;
|
||||
} float_shape_type;
|
||||
|
||||
/* Get a 32 bit int from a float. */
|
||||
#ifndef GEN_OCL_GET_FLOAT_WORD
|
||||
# define GEN_OCL_GET_FLOAT_WORD(i,d) \
|
||||
do { \
|
||||
float_shape_type gf_u; \
|
||||
gf_u.value = (d); \
|
||||
(i) = gf_u.word; \
|
||||
} while (0)
|
||||
#endif
|
||||
/* Set a float from a 32 bit int. */
|
||||
#ifndef GEN_OCL_SET_FLOAT_WORD
|
||||
# define GEN_OCL_SET_FLOAT_WORD(d,i) \
|
||||
do { \
|
||||
float_shape_type sf_u; \
|
||||
sf_u.word = (i); \
|
||||
(d) = sf_u.value; \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
INLINE_OVERLOADABLE int __ocl_finitef (float x){
|
||||
unsigned ix;
|
||||
GEN_OCL_GET_FLOAT_WORD (ix, x);
|
||||
return (ix & 0x7fffffff) < 0x7f800000;
|
||||
}
|
||||
|
||||
#define HUGE_VALF (__ocl_inff())
|
||||
#define INFINITY (__ocl_inff())
|
||||
#define NAN (__ocl_nanf())
|
||||
#define M_E_F 2.718281828459045F
|
||||
#define M_LOG2E_F 1.4426950408889634F
|
||||
#define M_LOG10E_F 0.43429448190325176F
|
||||
#define M_LOG210_F 3.3219280948873626F
|
||||
#define M_LN2_F 0.6931471805599453F
|
||||
#define M_LN10_F 2.302585092994046F
|
||||
#define M_PI_F 3.141592653589793F
|
||||
#define M_PI_2_F 1.5707963267948966F
|
||||
#define M_PI_4_F 0.7853981633974483F
|
||||
#define M_1_PI_F 0.3183098861837907F
|
||||
#define M_2_PI_F 0.6366197723675814F
|
||||
#define M_180_PI_F 57.295779513082321F
|
||||
#define M_2_SQRTPI_F 1.1283791670955126F
|
||||
#define M_SQRT2_F 1.4142135623730951F
|
||||
#define M_SQRT1_2_F 0.7071067811865476F
|
||||
#define FP_ILOGB0 (-0x7FFFFFFF-1)
|
||||
#define FP_ILOGBNAN FP_ILOGB0
|
||||
|
||||
#define DF_EXP_MASK 0x7FF0000000000000UL
|
||||
#define DF_MAX_NORMAL 0x7FF0000000000000UL
|
||||
#define DF_MAN_MASK 0xFFFFFFFFFFFFFUL
|
||||
#define DF_MIN_NORMAL 0x10000000000000UL
|
||||
#define DF_ABS_MASK 0x7FFFFFFFFFFFFFFFUL
|
||||
#define DF_POSITIVE_INF 0x7FF0000000000000UL
|
||||
#define DF_SIGN_MASK 0x8000000000000000UL
|
||||
#define DF_IMPLICITE_ONE 0x10000000000000UL
|
||||
#define DF_EXP_OFFSET 52
|
||||
#define DF_SIGN_OFFSET 63
|
||||
#define DF_EXP_BIAS 1023
|
||||
#define DF_NEGTIVE_INF 0xFFF0000000000000
|
||||
|
||||
#define SF_POSITIVE_INF 0x7F800000
|
||||
#define SF_NAN 0x7FFFFFFF
|
||||
|
||||
#define M_PI 3.141592653589793238462643383279
|
||||
|
||||
#endif /* __OCL_FLOAT_H__ */
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_GEOMETRIC_H__
|
||||
#define __OCL_GEOMETRIC_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
OVERLOADABLE float dot(float p0, float p1);
|
||||
OVERLOADABLE float dot(float2 p0, float2 p1);
|
||||
OVERLOADABLE float dot(float3 p0, float3 p1);
|
||||
OVERLOADABLE float dot(float4 p0, float4 p1);
|
||||
OVERLOADABLE half dot(half p0, half p1);
|
||||
OVERLOADABLE half dot(half2 p0, half2 p1);
|
||||
OVERLOADABLE half dot(half3 p0, half3 p1);
|
||||
OVERLOADABLE half dot(half4 p0, half4 p1);
|
||||
OVERLOADABLE float length(float x);
|
||||
OVERLOADABLE float length(float2 x);
|
||||
OVERLOADABLE float length(float3 x);
|
||||
OVERLOADABLE float length(float4 x);
|
||||
OVERLOADABLE float distance(float x, float y);
|
||||
OVERLOADABLE float distance(float2 x, float2 y);
|
||||
OVERLOADABLE float distance(float3 x, float3 y);
|
||||
OVERLOADABLE float distance(float4 x, float4 y);
|
||||
OVERLOADABLE float normalize(float x);
|
||||
OVERLOADABLE float2 normalize(float2 x);
|
||||
OVERLOADABLE float3 normalize(float3 x);
|
||||
OVERLOADABLE float4 normalize(float4 x);
|
||||
|
||||
OVERLOADABLE float fast_length(float x);
|
||||
OVERLOADABLE float fast_length(float2 x);
|
||||
OVERLOADABLE float fast_length(float3 x);
|
||||
OVERLOADABLE float fast_length(float4 x);
|
||||
OVERLOADABLE float fast_distance(float x, float y);
|
||||
OVERLOADABLE float fast_distance(float2 x, float2 y);
|
||||
OVERLOADABLE float fast_distance(float3 x, float3 y);
|
||||
OVERLOADABLE float fast_distance(float4 x, float4 y);
|
||||
OVERLOADABLE float fast_normalize(float x);
|
||||
OVERLOADABLE float2 fast_normalize(float2 x);
|
||||
OVERLOADABLE float3 fast_normalize(float3 x);
|
||||
OVERLOADABLE float4 fast_normalize(float4 x);
|
||||
|
||||
OVERLOADABLE float3 cross(float3 v0, float3 v1);
|
||||
OVERLOADABLE float4 cross(float4 v0, float4 v1);
|
||||
|
||||
OVERLOADABLE double dot(double p0, double p1);
|
||||
OVERLOADABLE double dot(double2 p0, double2 p1);
|
||||
OVERLOADABLE double dot(double3 p0, double3 p1);
|
||||
OVERLOADABLE double dot(double4 p0, double4 p1);
|
||||
OVERLOADABLE double length(double x);
|
||||
OVERLOADABLE double length(double2 x);
|
||||
OVERLOADABLE double length(double3 x);
|
||||
OVERLOADABLE double length(double4 x);
|
||||
OVERLOADABLE double distance(double x, double y);
|
||||
OVERLOADABLE double distance(double2 x, double2 y);
|
||||
OVERLOADABLE double distance(double3 x, double3 y);
|
||||
OVERLOADABLE double distance(double4 x, double4 y);
|
||||
OVERLOADABLE double normalize(double x);
|
||||
OVERLOADABLE double2 normalize(double2 x);
|
||||
OVERLOADABLE double3 normalize(double3 x);
|
||||
OVERLOADABLE double4 normalize(double4 x);
|
||||
OVERLOADABLE double3 cross(double3 v0, double3 v1);
|
||||
OVERLOADABLE double4 cross(double4 v0, double4 v1);
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,200 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_IMAGE_H__
|
||||
#define __OCL_IMAGE_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
#define int1 int
|
||||
#define float1 float
|
||||
|
||||
#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
|
||||
|
||||
#define DECL_IMAGE_READ_SAMPLE_RETTYPE(IMG_TYPE, DATA_YPE, SUFFIX, N) \
|
||||
OVERLOADABLE DATA_YPE read_image ## SUFFIX(IMG_TYPE cl_image, const sampler_t sampler, int##N coord); \
|
||||
OVERLOADABLE DATA_YPE read_image ## SUFFIX(IMG_TYPE cl_image, const sampler_t sampler, float##N coord);
|
||||
|
||||
#define DECL_IMAGE_READ_NO_SAMPLE_RETTYPE(IMG_TYPE, DATA_YPE, SUFFIX, N) \
|
||||
OVERLOADABLE DATA_YPE read_image ## SUFFIX(IMG_TYPE cl_image, int##N coord);
|
||||
|
||||
#define DECL_IMAGE_WRITE_RETTYPE(IMG_TYPE, DATA_YPE, SUFFIX, N) \
|
||||
OVERLOADABLE void write_image ## SUFFIX(IMG_TYPE cl_image, int##N coord, DATA_YPE color);
|
||||
|
||||
#define DECL_IMAGE_TYPE_READ_NO_SAMPLE(IMG_TYPE, N)\
|
||||
DECL_IMAGE_READ_NO_SAMPLE_RETTYPE(IMG_TYPE, int4, i, N) \
|
||||
DECL_IMAGE_READ_NO_SAMPLE_RETTYPE(IMG_TYPE, uint4, ui, N) \
|
||||
DECL_IMAGE_READ_NO_SAMPLE_RETTYPE(IMG_TYPE, float4, f, N)
|
||||
|
||||
#define DECL_IMAGE_TYPE_READ_SAMPLE(IMG_TYPE, N)\
|
||||
DECL_IMAGE_READ_SAMPLE_RETTYPE(IMG_TYPE, int4, i, N) \
|
||||
DECL_IMAGE_READ_SAMPLE_RETTYPE(IMG_TYPE, uint4, ui, N) \
|
||||
DECL_IMAGE_READ_SAMPLE_RETTYPE(IMG_TYPE, float4, f, N)
|
||||
|
||||
#define DECL_IMAGE_TYPE_WRITE(IMG_TYPE, N)\
|
||||
DECL_IMAGE_WRITE_RETTYPE(IMG_TYPE, int4, i, N) \
|
||||
DECL_IMAGE_WRITE_RETTYPE(IMG_TYPE, uint4, ui, N) \
|
||||
DECL_IMAGE_WRITE_RETTYPE(IMG_TYPE, float4, f, N)
|
||||
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
#define DECL_IMAGE(IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_write IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(write_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(read_write IMG_TYPE, N)
|
||||
#else
|
||||
#define DECL_IMAGE(IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(write_only IMG_TYPE, N)
|
||||
#endif
|
||||
|
||||
DECL_IMAGE(image1d_t, 1)
|
||||
DECL_IMAGE(image2d_t, 2)
|
||||
DECL_IMAGE(image1d_array_t, 2)
|
||||
DECL_IMAGE(image3d_t, 3)
|
||||
DECL_IMAGE(image3d_t, 4)
|
||||
DECL_IMAGE(image2d_array_t, 3)
|
||||
DECL_IMAGE(image2d_array_t, 4)
|
||||
|
||||
#undef DECL_IMAGE
|
||||
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
#define DECL_IMAGE(IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_write IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(write_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(read_write IMG_TYPE, N)
|
||||
#else
|
||||
#define DECL_IMAGE(IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_READ_NO_SAMPLE(read_only IMG_TYPE, N) \
|
||||
DECL_IMAGE_TYPE_WRITE(write_only IMG_TYPE, N)
|
||||
#endif
|
||||
|
||||
DECL_IMAGE(image1d_buffer_t, 1)
|
||||
|
||||
#undef int1
|
||||
#undef float1
|
||||
#undef DECL_IMAGE_TYPE_READ_NO_SAMPLE
|
||||
#undef DECL_IMAGE_TYPE_WRITE
|
||||
#undef DECL_IMAGE
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image1d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image1d_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image1d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image1d_buffer_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image2d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image2d_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image2d_t image);
|
||||
OVERLOADABLE int get_image_height(read_only image2d_t image);
|
||||
OVERLOADABLE int2 get_image_dim(read_only image2d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image1d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image1d_array_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image1d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(read_only image1d_array_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image3d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image3d_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image3d_t image);
|
||||
OVERLOADABLE int get_image_height(read_only image3d_t image);
|
||||
OVERLOADABLE int get_image_depth(read_only image3d_t image);
|
||||
OVERLOADABLE int4 get_image_dim(read_only image3d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_width(read_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_height(read_only image2d_array_t image);
|
||||
OVERLOADABLE int2 get_image_dim(read_only image2d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(read_only image2d_array_t image);
|
||||
|
||||
#if __clang_major__*10 + __clang_minor__ >= 39
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image1d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image1d_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image1d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image1d_buffer_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image2d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image2d_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image2d_t image);
|
||||
OVERLOADABLE int get_image_height(write_only image2d_t image);
|
||||
OVERLOADABLE int2 get_image_dim(write_only image2d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image1d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image1d_array_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image1d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(write_only image1d_array_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image3d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image3d_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image3d_t image);
|
||||
OVERLOADABLE int get_image_height(write_only image3d_t image);
|
||||
OVERLOADABLE int get_image_depth(write_only image3d_t image);
|
||||
OVERLOADABLE int4 get_image_dim(write_only image3d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(write_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(write_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_width(write_only image2d_array_t image);
|
||||
OVERLOADABLE int get_image_height(write_only image2d_array_t image);
|
||||
OVERLOADABLE int2 get_image_dim(write_only image2d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(write_only image2d_array_t image);
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image1d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image1d_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image1d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image1d_buffer_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image1d_buffer_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image2d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image2d_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image2d_t image);
|
||||
OVERLOADABLE int get_image_height(read_write image2d_t image);
|
||||
OVERLOADABLE int2 get_image_dim(read_write image2d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image1d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image1d_array_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image1d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(read_write image1d_array_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image3d_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image3d_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image3d_t image);
|
||||
OVERLOADABLE int get_image_height(read_write image3d_t image);
|
||||
OVERLOADABLE int get_image_depth(read_write image3d_t image);
|
||||
OVERLOADABLE int4 get_image_dim(read_write image3d_t image);
|
||||
|
||||
OVERLOADABLE int get_image_channel_data_type(read_write image2d_array_t image);
|
||||
OVERLOADABLE int get_image_channel_order(read_write image2d_array_t image);
|
||||
OVERLOADABLE int get_image_width(read_write image2d_array_t image);
|
||||
OVERLOADABLE int get_image_height(read_write image2d_array_t image);
|
||||
OVERLOADABLE int2 get_image_dim(read_write image2d_array_t image);
|
||||
OVERLOADABLE size_t get_image_array_size(read_write image2d_array_t image);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,549 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_MATH_H__
|
||||
#define __OCL_MATH_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
#include "ocl_math_common.h"
|
||||
|
||||
|
||||
OVERLOADABLE float lgamma_r(float x, global int *signgamp);
|
||||
OVERLOADABLE float lgamma_r(float x, local int *signgamp);
|
||||
OVERLOADABLE float lgamma_r(float x, private int *signgamp);
|
||||
OVERLOADABLE float sincos(float x, global float *cosval);
|
||||
OVERLOADABLE float sincos(float x, local float *cosval);
|
||||
OVERLOADABLE float sincos(float x, private float *cosval);
|
||||
OVERLOADABLE float frexp(float x, global int *exp);
|
||||
OVERLOADABLE float frexp(float x, local int *exp);
|
||||
OVERLOADABLE float frexp(float x, private int *exp);
|
||||
OVERLOADABLE float modf(float x, global float *i);
|
||||
OVERLOADABLE float modf(float x, local float *i);
|
||||
OVERLOADABLE float modf(float x, private float *i);
|
||||
OVERLOADABLE float fract(float x, global float *p);
|
||||
OVERLOADABLE float fract(float x, local float *p);
|
||||
OVERLOADABLE float fract(float x, private float *p);
|
||||
OVERLOADABLE float remquo(float x, float y, global int *quo);
|
||||
OVERLOADABLE float remquo(float x, float y, local int *quo);
|
||||
OVERLOADABLE float remquo(float x, float y, private int *quo);
|
||||
|
||||
|
||||
OVERLOADABLE half lgamma_r(half x, global int *signgamp);
|
||||
OVERLOADABLE half lgamma_r(half x, local int *signgamp);
|
||||
OVERLOADABLE half lgamma_r(half x, private int *signgamp);
|
||||
OVERLOADABLE half sincos(half x, global half *cosval);
|
||||
OVERLOADABLE half sincos(half x, local half *cosval);
|
||||
OVERLOADABLE half sincos(half x, private half *cosval);
|
||||
OVERLOADABLE half frexp(half x, global int *exp);
|
||||
OVERLOADABLE half frexp(half x, local int *exp);
|
||||
OVERLOADABLE half frexp(half x, private int *exp);
|
||||
OVERLOADABLE half modf(half x, global half *i);
|
||||
OVERLOADABLE half modf(half x, local half *i);
|
||||
OVERLOADABLE half modf(half x, private half *i);
|
||||
OVERLOADABLE half fract(half x, global half *p);
|
||||
OVERLOADABLE half fract(half x, local half *p);
|
||||
OVERLOADABLE half fract(half x, private half *p);
|
||||
OVERLOADABLE half remquo(half x, half y, global int *quo);
|
||||
OVERLOADABLE half remquo(half x, half y, local int *quo);
|
||||
OVERLOADABLE half remquo(half x, half y, private int *quo);
|
||||
|
||||
|
||||
|
||||
//------- double -----------
|
||||
OVERLOADABLE double fract(double x, global double *p);
|
||||
OVERLOADABLE double fract(double x, local double *p);
|
||||
OVERLOADABLE double fract(double x, private double *p);
|
||||
OVERLOADABLE double frexp(double x, global int *exp);
|
||||
OVERLOADABLE double frexp(double x, local int *exp);
|
||||
OVERLOADABLE double frexp(double x, private int *exp);
|
||||
OVERLOADABLE double lgamma_r(double x, global int *signgamp);
|
||||
OVERLOADABLE double lgamma_r(double x, local int *signgamp);
|
||||
OVERLOADABLE double lgamma_r(double x, private int *signgamp);
|
||||
OVERLOADABLE double modf(double x, global double *i);
|
||||
OVERLOADABLE double modf(double x, local double *i);
|
||||
OVERLOADABLE double modf(double x, private double *i);
|
||||
OVERLOADABLE double remquo(double x, double y, global int *quo);
|
||||
OVERLOADABLE double remquo(double x, double y, local int *quo);
|
||||
OVERLOADABLE double remquo(double x, double y, private int *quo);
|
||||
OVERLOADABLE double sincos(double x, global double *cosval);
|
||||
OVERLOADABLE double sincos(double x, local double *cosval);
|
||||
OVERLOADABLE double sincos(double x, private double *cosval);
|
||||
|
||||
|
||||
//Begin from this part is autogenerated.
|
||||
//Don't modify it manually.
|
||||
//math builtin functions
|
||||
//gentype fract (gentype x, __global gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 fract (float2 param0, __global float2 *param1);
|
||||
OVERLOADABLE float3 fract (float3 param0, __global float3 *param1);
|
||||
OVERLOADABLE float4 fract (float4 param0, __global float4 *param1);
|
||||
OVERLOADABLE float8 fract (float8 param0, __global float8 *param1);
|
||||
OVERLOADABLE float16 fract (float16 param0, __global float16 *param1);
|
||||
OVERLOADABLE double2 fract (double2 param0, __global double2 *param1);
|
||||
OVERLOADABLE double3 fract (double3 param0, __global double3 *param1);
|
||||
OVERLOADABLE double4 fract (double4 param0, __global double4 *param1);
|
||||
OVERLOADABLE double8 fract (double8 param0, __global double8 *param1);
|
||||
OVERLOADABLE double16 fract (double16 param0, __global double16 *param1);
|
||||
OVERLOADABLE half2 fract (half2 param0, __global half2 *param1);
|
||||
OVERLOADABLE half3 fract (half3 param0, __global half3 *param1);
|
||||
OVERLOADABLE half4 fract (half4 param0, __global half4 *param1);
|
||||
OVERLOADABLE half8 fract (half8 param0, __global half8 *param1);
|
||||
OVERLOADABLE half16 fract (half16 param0, __global half16 *param1);
|
||||
|
||||
//gentype fract (gentype x, __local gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 fract (float2 param0, __local float2 *param1);
|
||||
OVERLOADABLE float3 fract (float3 param0, __local float3 *param1);
|
||||
OVERLOADABLE float4 fract (float4 param0, __local float4 *param1);
|
||||
OVERLOADABLE float8 fract (float8 param0, __local float8 *param1);
|
||||
OVERLOADABLE float16 fract (float16 param0, __local float16 *param1);
|
||||
OVERLOADABLE double2 fract (double2 param0, __local double2 *param1);
|
||||
OVERLOADABLE double3 fract (double3 param0, __local double3 *param1);
|
||||
OVERLOADABLE double4 fract (double4 param0, __local double4 *param1);
|
||||
OVERLOADABLE double8 fract (double8 param0, __local double8 *param1);
|
||||
OVERLOADABLE double16 fract (double16 param0, __local double16 *param1);
|
||||
OVERLOADABLE half2 fract (half2 param0, __local half2 *param1);
|
||||
OVERLOADABLE half3 fract (half3 param0, __local half3 *param1);
|
||||
OVERLOADABLE half4 fract (half4 param0, __local half4 *param1);
|
||||
OVERLOADABLE half8 fract (half8 param0, __local half8 *param1);
|
||||
OVERLOADABLE half16 fract (half16 param0, __local half16 *param1);
|
||||
|
||||
//gentype fract (gentype x, __private gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 fract (float2 param0, __private float2 *param1);
|
||||
OVERLOADABLE float3 fract (float3 param0, __private float3 *param1);
|
||||
OVERLOADABLE float4 fract (float4 param0, __private float4 *param1);
|
||||
OVERLOADABLE float8 fract (float8 param0, __private float8 *param1);
|
||||
OVERLOADABLE float16 fract (float16 param0, __private float16 *param1);
|
||||
OVERLOADABLE double2 fract (double2 param0, __private double2 *param1);
|
||||
OVERLOADABLE double3 fract (double3 param0, __private double3 *param1);
|
||||
OVERLOADABLE double4 fract (double4 param0, __private double4 *param1);
|
||||
OVERLOADABLE double8 fract (double8 param0, __private double8 *param1);
|
||||
OVERLOADABLE double16 fract (double16 param0, __private double16 *param1);
|
||||
OVERLOADABLE half2 fract (half2 param0, __private half2 *param1);
|
||||
OVERLOADABLE half3 fract (half3 param0, __private half3 *param1);
|
||||
OVERLOADABLE half4 fract (half4 param0, __private half4 *param1);
|
||||
OVERLOADABLE half8 fract (half8 param0, __private half8 *param1);
|
||||
OVERLOADABLE half16 fract (half16 param0, __private half16 *param1);
|
||||
|
||||
//floatn frexp (floatn x, __global intn *exp)
|
||||
|
||||
OVERLOADABLE float2 frexp (float2 param0, __global int2 *param1);
|
||||
OVERLOADABLE float3 frexp (float3 param0, __global int3 *param1);
|
||||
OVERLOADABLE float4 frexp (float4 param0, __global int4 *param1);
|
||||
OVERLOADABLE float8 frexp (float8 param0, __global int8 *param1);
|
||||
OVERLOADABLE float16 frexp (float16 param0, __global int16 *param1);
|
||||
|
||||
//floatn frexp (floatn x, __local intn *exp)
|
||||
|
||||
OVERLOADABLE float2 frexp (float2 param0, __local int2 *param1);
|
||||
OVERLOADABLE float3 frexp (float3 param0, __local int3 *param1);
|
||||
OVERLOADABLE float4 frexp (float4 param0, __local int4 *param1);
|
||||
OVERLOADABLE float8 frexp (float8 param0, __local int8 *param1);
|
||||
OVERLOADABLE float16 frexp (float16 param0, __local int16 *param1);
|
||||
|
||||
//floatn frexp (floatn x, __private intn *exp)
|
||||
|
||||
OVERLOADABLE float2 frexp (float2 param0, __private int2 *param1);
|
||||
OVERLOADABLE float3 frexp (float3 param0, __private int3 *param1);
|
||||
OVERLOADABLE float4 frexp (float4 param0, __private int4 *param1);
|
||||
OVERLOADABLE float8 frexp (float8 param0, __private int8 *param1);
|
||||
OVERLOADABLE float16 frexp (float16 param0, __private int16 *param1);
|
||||
|
||||
//float frexp (float x, __global int *exp)
|
||||
|
||||
|
||||
//float frexp (float x, __local int *exp)
|
||||
|
||||
|
||||
//float frexp (float x, __private int *exp)
|
||||
|
||||
|
||||
//halfn frexp (halfn x, __global intn *exp)
|
||||
|
||||
OVERLOADABLE half2 frexp (half2 param0, __global int2 *param1);
|
||||
OVERLOADABLE half3 frexp (half3 param0, __global int3 *param1);
|
||||
OVERLOADABLE half4 frexp (half4 param0, __global int4 *param1);
|
||||
OVERLOADABLE half8 frexp (half8 param0, __global int8 *param1);
|
||||
OVERLOADABLE half16 frexp (half16 param0, __global int16 *param1);
|
||||
|
||||
//halfn frexp (halfn x, __local intn *exp)
|
||||
|
||||
OVERLOADABLE half2 frexp (half2 param0, __local int2 *param1);
|
||||
OVERLOADABLE half3 frexp (half3 param0, __local int3 *param1);
|
||||
OVERLOADABLE half4 frexp (half4 param0, __local int4 *param1);
|
||||
OVERLOADABLE half8 frexp (half8 param0, __local int8 *param1);
|
||||
OVERLOADABLE half16 frexp (half16 param0, __local int16 *param1);
|
||||
|
||||
//halfn frexp (halfn x, __private intn *exp)
|
||||
|
||||
OVERLOADABLE half2 frexp (half2 param0, __private int2 *param1);
|
||||
OVERLOADABLE half3 frexp (half3 param0, __private int3 *param1);
|
||||
OVERLOADABLE half4 frexp (half4 param0, __private int4 *param1);
|
||||
OVERLOADABLE half8 frexp (half8 param0, __private int8 *param1);
|
||||
OVERLOADABLE half16 frexp (half16 param0, __private int16 *param1);
|
||||
|
||||
//half frexp (half x, __global int *exp)
|
||||
|
||||
|
||||
//half frexp (half x, __local int *exp)
|
||||
|
||||
|
||||
//half frexp (half x, __private int *exp)
|
||||
|
||||
|
||||
//doublen frexp (doublen x, __global intn *exp)
|
||||
|
||||
OVERLOADABLE double2 frexp (double2 param0, __global int2 *param1);
|
||||
OVERLOADABLE double3 frexp (double3 param0, __global int3 *param1);
|
||||
OVERLOADABLE double4 frexp (double4 param0, __global int4 *param1);
|
||||
OVERLOADABLE double8 frexp (double8 param0, __global int8 *param1);
|
||||
OVERLOADABLE double16 frexp (double16 param0, __global int16 *param1);
|
||||
|
||||
//doublen frexp (doublen x, __local intn *exp)
|
||||
|
||||
OVERLOADABLE double2 frexp (double2 param0, __local int2 *param1);
|
||||
OVERLOADABLE double3 frexp (double3 param0, __local int3 *param1);
|
||||
OVERLOADABLE double4 frexp (double4 param0, __local int4 *param1);
|
||||
OVERLOADABLE double8 frexp (double8 param0, __local int8 *param1);
|
||||
OVERLOADABLE double16 frexp (double16 param0, __local int16 *param1);
|
||||
|
||||
//doublen frexp (doublen x, __private intn *exp)
|
||||
|
||||
OVERLOADABLE double2 frexp (double2 param0, __private int2 *param1);
|
||||
OVERLOADABLE double3 frexp (double3 param0, __private int3 *param1);
|
||||
OVERLOADABLE double4 frexp (double4 param0, __private int4 *param1);
|
||||
OVERLOADABLE double8 frexp (double8 param0, __private int8 *param1);
|
||||
OVERLOADABLE double16 frexp (double16 param0, __private int16 *param1);
|
||||
|
||||
//double frexp (double x, __global int *exp)
|
||||
|
||||
|
||||
//double frexp (double x, __local int *exp)
|
||||
|
||||
|
||||
//double frexp (double x, __private int *exp)
|
||||
|
||||
|
||||
//floatn lgamma_r (floatn x, __global intn *signp)
|
||||
|
||||
OVERLOADABLE float2 lgamma_r (float2 param0, __global int2 *param1);
|
||||
OVERLOADABLE float3 lgamma_r (float3 param0, __global int3 *param1);
|
||||
OVERLOADABLE float4 lgamma_r (float4 param0, __global int4 *param1);
|
||||
OVERLOADABLE float8 lgamma_r (float8 param0, __global int8 *param1);
|
||||
OVERLOADABLE float16 lgamma_r (float16 param0, __global int16 *param1);
|
||||
|
||||
//floatn lgamma_r (floatn x, __local intn *signp)
|
||||
|
||||
OVERLOADABLE float2 lgamma_r (float2 param0, __local int2 *param1);
|
||||
OVERLOADABLE float3 lgamma_r (float3 param0, __local int3 *param1);
|
||||
OVERLOADABLE float4 lgamma_r (float4 param0, __local int4 *param1);
|
||||
OVERLOADABLE float8 lgamma_r (float8 param0, __local int8 *param1);
|
||||
OVERLOADABLE float16 lgamma_r (float16 param0, __local int16 *param1);
|
||||
|
||||
//floatn lgamma_r (floatn x, __private intn *signp)
|
||||
|
||||
OVERLOADABLE float2 lgamma_r (float2 param0, __private int2 *param1);
|
||||
OVERLOADABLE float3 lgamma_r (float3 param0, __private int3 *param1);
|
||||
OVERLOADABLE float4 lgamma_r (float4 param0, __private int4 *param1);
|
||||
OVERLOADABLE float8 lgamma_r (float8 param0, __private int8 *param1);
|
||||
OVERLOADABLE float16 lgamma_r (float16 param0, __private int16 *param1);
|
||||
|
||||
//float lgamma_r (float x, __global int *signp)
|
||||
|
||||
|
||||
//float lgamma_r (float x, __local int *signp)
|
||||
|
||||
|
||||
//float lgamma_r (float x, __private int *signp)
|
||||
|
||||
|
||||
//halfn lgamma_r (halfn x, __global intn *signp)
|
||||
|
||||
OVERLOADABLE half2 lgamma_r (half2 param0, __global int2 *param1);
|
||||
OVERLOADABLE half3 lgamma_r (half3 param0, __global int3 *param1);
|
||||
OVERLOADABLE half4 lgamma_r (half4 param0, __global int4 *param1);
|
||||
OVERLOADABLE half8 lgamma_r (half8 param0, __global int8 *param1);
|
||||
OVERLOADABLE half16 lgamma_r (half16 param0, __global int16 *param1);
|
||||
|
||||
//halfn lgamma_r (halfn x, __local intn *signp)
|
||||
|
||||
OVERLOADABLE half2 lgamma_r (half2 param0, __local int2 *param1);
|
||||
OVERLOADABLE half3 lgamma_r (half3 param0, __local int3 *param1);
|
||||
OVERLOADABLE half4 lgamma_r (half4 param0, __local int4 *param1);
|
||||
OVERLOADABLE half8 lgamma_r (half8 param0, __local int8 *param1);
|
||||
OVERLOADABLE half16 lgamma_r (half16 param0, __local int16 *param1);
|
||||
|
||||
//halfn lgamma_r (halfn x, __private intn *signp)
|
||||
|
||||
OVERLOADABLE half2 lgamma_r (half2 param0, __private int2 *param1);
|
||||
OVERLOADABLE half3 lgamma_r (half3 param0, __private int3 *param1);
|
||||
OVERLOADABLE half4 lgamma_r (half4 param0, __private int4 *param1);
|
||||
OVERLOADABLE half8 lgamma_r (half8 param0, __private int8 *param1);
|
||||
OVERLOADABLE half16 lgamma_r (half16 param0, __private int16 *param1);
|
||||
|
||||
//half lgamma_r (half x, __global int *signp)
|
||||
|
||||
|
||||
//half lgamma_r (half x, __local int *signp)
|
||||
|
||||
|
||||
//half lgamma_r (half x, __private int *signp)
|
||||
|
||||
|
||||
//doublen lgamma_r (doublen x, __global intn *signp)
|
||||
|
||||
OVERLOADABLE double2 lgamma_r (double2 param0, __global int2 *param1);
|
||||
OVERLOADABLE double3 lgamma_r (double3 param0, __global int3 *param1);
|
||||
OVERLOADABLE double4 lgamma_r (double4 param0, __global int4 *param1);
|
||||
OVERLOADABLE double8 lgamma_r (double8 param0, __global int8 *param1);
|
||||
OVERLOADABLE double16 lgamma_r (double16 param0, __global int16 *param1);
|
||||
|
||||
//doublen lgamma_r (doublen x, __local intn *signp)
|
||||
|
||||
OVERLOADABLE double2 lgamma_r (double2 param0, __local int2 *param1);
|
||||
OVERLOADABLE double3 lgamma_r (double3 param0, __local int3 *param1);
|
||||
OVERLOADABLE double4 lgamma_r (double4 param0, __local int4 *param1);
|
||||
OVERLOADABLE double8 lgamma_r (double8 param0, __local int8 *param1);
|
||||
OVERLOADABLE double16 lgamma_r (double16 param0, __local int16 *param1);
|
||||
|
||||
//doublen lgamma_r (doublen x, __private intn *signp)
|
||||
|
||||
OVERLOADABLE double2 lgamma_r (double2 param0, __private int2 *param1);
|
||||
OVERLOADABLE double3 lgamma_r (double3 param0, __private int3 *param1);
|
||||
OVERLOADABLE double4 lgamma_r (double4 param0, __private int4 *param1);
|
||||
OVERLOADABLE double8 lgamma_r (double8 param0, __private int8 *param1);
|
||||
OVERLOADABLE double16 lgamma_r (double16 param0, __private int16 *param1);
|
||||
|
||||
//double lgamma_r (double x, __global int *signp)
|
||||
|
||||
|
||||
//double lgamma_r (double x, __local int *signp)
|
||||
|
||||
|
||||
//double lgamma_r (double x, __private int *signp)
|
||||
|
||||
|
||||
//gentype modf (gentype x, __global gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 modf (float2 param0, __global float2 *param1);
|
||||
OVERLOADABLE float3 modf (float3 param0, __global float3 *param1);
|
||||
OVERLOADABLE float4 modf (float4 param0, __global float4 *param1);
|
||||
OVERLOADABLE float8 modf (float8 param0, __global float8 *param1);
|
||||
OVERLOADABLE float16 modf (float16 param0, __global float16 *param1);
|
||||
OVERLOADABLE double2 modf (double2 param0, __global double2 *param1);
|
||||
OVERLOADABLE double3 modf (double3 param0, __global double3 *param1);
|
||||
OVERLOADABLE double4 modf (double4 param0, __global double4 *param1);
|
||||
OVERLOADABLE double8 modf (double8 param0, __global double8 *param1);
|
||||
OVERLOADABLE double16 modf (double16 param0, __global double16 *param1);
|
||||
OVERLOADABLE half2 modf (half2 param0, __global half2 *param1);
|
||||
OVERLOADABLE half3 modf (half3 param0, __global half3 *param1);
|
||||
OVERLOADABLE half4 modf (half4 param0, __global half4 *param1);
|
||||
OVERLOADABLE half8 modf (half8 param0, __global half8 *param1);
|
||||
OVERLOADABLE half16 modf (half16 param0, __global half16 *param1);
|
||||
|
||||
//gentype modf (gentype x, __local gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 modf (float2 param0, __local float2 *param1);
|
||||
OVERLOADABLE float3 modf (float3 param0, __local float3 *param1);
|
||||
OVERLOADABLE float4 modf (float4 param0, __local float4 *param1);
|
||||
OVERLOADABLE float8 modf (float8 param0, __local float8 *param1);
|
||||
OVERLOADABLE float16 modf (float16 param0, __local float16 *param1);
|
||||
OVERLOADABLE double2 modf (double2 param0, __local double2 *param1);
|
||||
OVERLOADABLE double3 modf (double3 param0, __local double3 *param1);
|
||||
OVERLOADABLE double4 modf (double4 param0, __local double4 *param1);
|
||||
OVERLOADABLE double8 modf (double8 param0, __local double8 *param1);
|
||||
OVERLOADABLE double16 modf (double16 param0, __local double16 *param1);
|
||||
OVERLOADABLE half2 modf (half2 param0, __local half2 *param1);
|
||||
OVERLOADABLE half3 modf (half3 param0, __local half3 *param1);
|
||||
OVERLOADABLE half4 modf (half4 param0, __local half4 *param1);
|
||||
OVERLOADABLE half8 modf (half8 param0, __local half8 *param1);
|
||||
OVERLOADABLE half16 modf (half16 param0, __local half16 *param1);
|
||||
|
||||
//gentype modf (gentype x, __private gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 modf (float2 param0, __private float2 *param1);
|
||||
OVERLOADABLE float3 modf (float3 param0, __private float3 *param1);
|
||||
OVERLOADABLE float4 modf (float4 param0, __private float4 *param1);
|
||||
OVERLOADABLE float8 modf (float8 param0, __private float8 *param1);
|
||||
OVERLOADABLE float16 modf (float16 param0, __private float16 *param1);
|
||||
OVERLOADABLE double2 modf (double2 param0, __private double2 *param1);
|
||||
OVERLOADABLE double3 modf (double3 param0, __private double3 *param1);
|
||||
OVERLOADABLE double4 modf (double4 param0, __private double4 *param1);
|
||||
OVERLOADABLE double8 modf (double8 param0, __private double8 *param1);
|
||||
OVERLOADABLE double16 modf (double16 param0, __private double16 *param1);
|
||||
OVERLOADABLE half2 modf (half2 param0, __private half2 *param1);
|
||||
OVERLOADABLE half3 modf (half3 param0, __private half3 *param1);
|
||||
OVERLOADABLE half4 modf (half4 param0, __private half4 *param1);
|
||||
OVERLOADABLE half8 modf (half8 param0, __private half8 *param1);
|
||||
OVERLOADABLE half16 modf (half16 param0, __private half16 *param1);
|
||||
|
||||
//floatn remquo (floatn x, floatn y, __global intn *quo)
|
||||
|
||||
OVERLOADABLE float2 remquo (float2 param0, float2 param1, __global int2 *param2);
|
||||
OVERLOADABLE float3 remquo (float3 param0, float3 param1, __global int3 *param2);
|
||||
OVERLOADABLE float4 remquo (float4 param0, float4 param1, __global int4 *param2);
|
||||
OVERLOADABLE float8 remquo (float8 param0, float8 param1, __global int8 *param2);
|
||||
OVERLOADABLE float16 remquo (float16 param0, float16 param1, __global int16 *param2);
|
||||
|
||||
//floatn remquo (floatn x, floatn y, __local intn *quo)
|
||||
|
||||
OVERLOADABLE float2 remquo (float2 param0, float2 param1, __local int2 *param2);
|
||||
OVERLOADABLE float3 remquo (float3 param0, float3 param1, __local int3 *param2);
|
||||
OVERLOADABLE float4 remquo (float4 param0, float4 param1, __local int4 *param2);
|
||||
OVERLOADABLE float8 remquo (float8 param0, float8 param1, __local int8 *param2);
|
||||
OVERLOADABLE float16 remquo (float16 param0, float16 param1, __local int16 *param2);
|
||||
|
||||
//floatn remquo (floatn x, floatn y, __private intn *quo)
|
||||
|
||||
OVERLOADABLE float2 remquo (float2 param0, float2 param1, __private int2 *param2);
|
||||
OVERLOADABLE float3 remquo (float3 param0, float3 param1, __private int3 *param2);
|
||||
OVERLOADABLE float4 remquo (float4 param0, float4 param1, __private int4 *param2);
|
||||
OVERLOADABLE float8 remquo (float8 param0, float8 param1, __private int8 *param2);
|
||||
OVERLOADABLE float16 remquo (float16 param0, float16 param1, __private int16 *param2);
|
||||
|
||||
//float remquo (float x, float y, __global int *quo)
|
||||
|
||||
|
||||
//float remquo (float x, float y, __local int *quo)
|
||||
|
||||
|
||||
//float remquo (float x, float y, __private int *quo)
|
||||
|
||||
|
||||
//halfn remquo (halfn x, halfn y, __global intn *quo)
|
||||
|
||||
OVERLOADABLE half2 remquo (half2 param0, half2 param1, __global int2 *param2);
|
||||
OVERLOADABLE half3 remquo (half3 param0, half3 param1, __global int3 *param2);
|
||||
OVERLOADABLE half4 remquo (half4 param0, half4 param1, __global int4 *param2);
|
||||
OVERLOADABLE half8 remquo (half8 param0, half8 param1, __global int8 *param2);
|
||||
OVERLOADABLE half16 remquo (half16 param0, half16 param1, __global int16 *param2);
|
||||
|
||||
//halfn remquo (halfn x, halfn y, __local intn *quo)
|
||||
|
||||
OVERLOADABLE half2 remquo (half2 param0, half2 param1, __local int2 *param2);
|
||||
OVERLOADABLE half3 remquo (half3 param0, half3 param1, __local int3 *param2);
|
||||
OVERLOADABLE half4 remquo (half4 param0, half4 param1, __local int4 *param2);
|
||||
OVERLOADABLE half8 remquo (half8 param0, half8 param1, __local int8 *param2);
|
||||
OVERLOADABLE half16 remquo (half16 param0, half16 param1, __local int16 *param2);
|
||||
|
||||
//halfn remquo (halfn x, halfn y, __private intn *quo)
|
||||
|
||||
OVERLOADABLE half2 remquo (half2 param0, half2 param1, __private int2 *param2);
|
||||
OVERLOADABLE half3 remquo (half3 param0, half3 param1, __private int3 *param2);
|
||||
OVERLOADABLE half4 remquo (half4 param0, half4 param1, __private int4 *param2);
|
||||
OVERLOADABLE half8 remquo (half8 param0, half8 param1, __private int8 *param2);
|
||||
OVERLOADABLE half16 remquo (half16 param0, half16 param1, __private int16 *param2);
|
||||
|
||||
//half remquo (half x, half y, __global int *quo)
|
||||
|
||||
|
||||
//half remquo (half x, half y, __local int *quo)
|
||||
|
||||
|
||||
//half remquo (half x, half y, __private int *quo)
|
||||
|
||||
|
||||
//doublen remquo (doublen x, doublen y, __global intn *quo)
|
||||
|
||||
OVERLOADABLE double2 remquo (double2 param0, double2 param1, __global int2 *param2);
|
||||
OVERLOADABLE double3 remquo (double3 param0, double3 param1, __global int3 *param2);
|
||||
OVERLOADABLE double4 remquo (double4 param0, double4 param1, __global int4 *param2);
|
||||
OVERLOADABLE double8 remquo (double8 param0, double8 param1, __global int8 *param2);
|
||||
OVERLOADABLE double16 remquo (double16 param0, double16 param1, __global int16 *param2);
|
||||
|
||||
//doublen remquo (doublen x, doublen y, __local intn *quo)
|
||||
|
||||
OVERLOADABLE double2 remquo (double2 param0, double2 param1, __local int2 *param2);
|
||||
OVERLOADABLE double3 remquo (double3 param0, double3 param1, __local int3 *param2);
|
||||
OVERLOADABLE double4 remquo (double4 param0, double4 param1, __local int4 *param2);
|
||||
OVERLOADABLE double8 remquo (double8 param0, double8 param1, __local int8 *param2);
|
||||
OVERLOADABLE double16 remquo (double16 param0, double16 param1, __local int16 *param2);
|
||||
|
||||
//doublen remquo (doublen x, doublen y, __private intn *quo)
|
||||
|
||||
OVERLOADABLE double2 remquo (double2 param0, double2 param1, __private int2 *param2);
|
||||
OVERLOADABLE double3 remquo (double3 param0, double3 param1, __private int3 *param2);
|
||||
OVERLOADABLE double4 remquo (double4 param0, double4 param1, __private int4 *param2);
|
||||
OVERLOADABLE double8 remquo (double8 param0, double8 param1, __private int8 *param2);
|
||||
OVERLOADABLE double16 remquo (double16 param0, double16 param1, __private int16 *param2);
|
||||
|
||||
//double remquo (double x, double y, __global int *quo)
|
||||
|
||||
|
||||
//double remquo (double x, double y, __local int *quo)
|
||||
|
||||
|
||||
//double remquo (double x, double y, __private int *quo)
|
||||
|
||||
|
||||
//gentype sincos (gentype x, __global gentype *cosval)
|
||||
|
||||
OVERLOADABLE float2 sincos (float2 param0, __global float2 *param1);
|
||||
OVERLOADABLE float3 sincos (float3 param0, __global float3 *param1);
|
||||
OVERLOADABLE float4 sincos (float4 param0, __global float4 *param1);
|
||||
OVERLOADABLE float8 sincos (float8 param0, __global float8 *param1);
|
||||
OVERLOADABLE float16 sincos (float16 param0, __global float16 *param1);
|
||||
OVERLOADABLE double2 sincos (double2 param0, __global double2 *param1);
|
||||
OVERLOADABLE double3 sincos (double3 param0, __global double3 *param1);
|
||||
OVERLOADABLE double4 sincos (double4 param0, __global double4 *param1);
|
||||
OVERLOADABLE double8 sincos (double8 param0, __global double8 *param1);
|
||||
OVERLOADABLE double16 sincos (double16 param0, __global double16 *param1);
|
||||
OVERLOADABLE half2 sincos (half2 param0, __global half2 *param1);
|
||||
OVERLOADABLE half3 sincos (half3 param0, __global half3 *param1);
|
||||
OVERLOADABLE half4 sincos (half4 param0, __global half4 *param1);
|
||||
OVERLOADABLE half8 sincos (half8 param0, __global half8 *param1);
|
||||
OVERLOADABLE half16 sincos (half16 param0, __global half16 *param1);
|
||||
|
||||
//gentype sincos (gentype x, __local gentype *cosval)
|
||||
|
||||
OVERLOADABLE float2 sincos (float2 param0, __local float2 *param1);
|
||||
OVERLOADABLE float3 sincos (float3 param0, __local float3 *param1);
|
||||
OVERLOADABLE float4 sincos (float4 param0, __local float4 *param1);
|
||||
OVERLOADABLE float8 sincos (float8 param0, __local float8 *param1);
|
||||
OVERLOADABLE float16 sincos (float16 param0, __local float16 *param1);
|
||||
OVERLOADABLE double2 sincos (double2 param0, __local double2 *param1);
|
||||
OVERLOADABLE double3 sincos (double3 param0, __local double3 *param1);
|
||||
OVERLOADABLE double4 sincos (double4 param0, __local double4 *param1);
|
||||
OVERLOADABLE double8 sincos (double8 param0, __local double8 *param1);
|
||||
OVERLOADABLE double16 sincos (double16 param0, __local double16 *param1);
|
||||
OVERLOADABLE half2 sincos (half2 param0, __local half2 *param1);
|
||||
OVERLOADABLE half3 sincos (half3 param0, __local half3 *param1);
|
||||
OVERLOADABLE half4 sincos (half4 param0, __local half4 *param1);
|
||||
OVERLOADABLE half8 sincos (half8 param0, __local half8 *param1);
|
||||
OVERLOADABLE half16 sincos (half16 param0, __local half16 *param1);
|
||||
|
||||
//gentype sincos (gentype x, __private gentype *cosval)
|
||||
|
||||
OVERLOADABLE float2 sincos (float2 param0, __private float2 *param1);
|
||||
OVERLOADABLE float3 sincos (float3 param0, __private float3 *param1);
|
||||
OVERLOADABLE float4 sincos (float4 param0, __private float4 *param1);
|
||||
OVERLOADABLE float8 sincos (float8 param0, __private float8 *param1);
|
||||
OVERLOADABLE float16 sincos (float16 param0, __private float16 *param1);
|
||||
OVERLOADABLE double2 sincos (double2 param0, __private double2 *param1);
|
||||
OVERLOADABLE double3 sincos (double3 param0, __private double3 *param1);
|
||||
OVERLOADABLE double4 sincos (double4 param0, __private double4 *param1);
|
||||
OVERLOADABLE double8 sincos (double8 param0, __private double8 *param1);
|
||||
OVERLOADABLE double16 sincos (double16 param0, __private double16 *param1);
|
||||
OVERLOADABLE half2 sincos (half2 param0, __private half2 *param1);
|
||||
OVERLOADABLE half3 sincos (half3 param0, __private half3 *param1);
|
||||
OVERLOADABLE half4 sincos (half4 param0, __private half4 *param1);
|
||||
OVERLOADABLE half8 sincos (half8 param0, __private half8 *param1);
|
||||
OVERLOADABLE half16 sincos (half16 param0, __private half16 *param1);
|
||||
|
||||
#endif
|
||||
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_MATH_20_H__
|
||||
#define __OCL_MATH_20_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
#include "ocl_math_common.h"
|
||||
|
||||
OVERLOADABLE float lgamma_r(float x, int *signgamp);
|
||||
OVERLOADABLE float sincos(float x, float *cosval);
|
||||
OVERLOADABLE float modf(float x, float *i);
|
||||
OVERLOADABLE float frexp(float x, int *exp);
|
||||
OVERLOADABLE float fract(float x, float *p);
|
||||
OVERLOADABLE float remquo(float x, float y, int *quo);
|
||||
|
||||
OVERLOADABLE half lgamma_r(half x, int *signgamp);
|
||||
OVERLOADABLE half sincos(half x, half *cosval);
|
||||
OVERLOADABLE half frexp(half x, int *exp);
|
||||
OVERLOADABLE half modf(half x, half *i);
|
||||
OVERLOADABLE half fract(half x, half *p);
|
||||
OVERLOADABLE half remquo(half x, half y, int *quo);
|
||||
|
||||
//------- double -----------
|
||||
OVERLOADABLE double fract(double x, double *p);
|
||||
OVERLOADABLE double frexp(double x, int *exp);
|
||||
OVERLOADABLE double lgamma_r(double x, int *signgamp);
|
||||
OVERLOADABLE double modf(double x, double *i);
|
||||
OVERLOADABLE double remquo(double x, double y, int *quo);
|
||||
OVERLOADABLE double sincos(double x, double *cosval);
|
||||
|
||||
//Begin from this part is autogenerated.
|
||||
//Don't modify it manually.
|
||||
//math builtin functions
|
||||
//gentype fract (gentype x, __generic gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 fract (float2 param0, __generic float2 *param1);
|
||||
OVERLOADABLE float3 fract (float3 param0, __generic float3 *param1);
|
||||
OVERLOADABLE float4 fract (float4 param0, __generic float4 *param1);
|
||||
OVERLOADABLE float8 fract (float8 param0, __generic float8 *param1);
|
||||
OVERLOADABLE float16 fract (float16 param0, __generic float16 *param1);
|
||||
OVERLOADABLE double2 fract (double2 param0, __generic double2 *param1);
|
||||
OVERLOADABLE double3 fract (double3 param0, __generic double3 *param1);
|
||||
OVERLOADABLE double4 fract (double4 param0, __generic double4 *param1);
|
||||
OVERLOADABLE double8 fract (double8 param0, __generic double8 *param1);
|
||||
OVERLOADABLE double16 fract (double16 param0, __generic double16 *param1);
|
||||
OVERLOADABLE half2 fract (half2 param0, __generic half2 *param1);
|
||||
OVERLOADABLE half3 fract (half3 param0, __generic half3 *param1);
|
||||
OVERLOADABLE half4 fract (half4 param0, __generic half4 *param1);
|
||||
OVERLOADABLE half8 fract (half8 param0, __generic half8 *param1);
|
||||
OVERLOADABLE half16 fract (half16 param0, __generic half16 *param1);
|
||||
|
||||
//floatn frexp (floatn x, __generic intn *exp)
|
||||
|
||||
OVERLOADABLE float2 frexp (float2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE float3 frexp (float3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE float4 frexp (float4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE float8 frexp (float8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE float16 frexp (float16 param0, __generic int16 *param1);
|
||||
|
||||
//float frexp (float x, __generic int *exp)
|
||||
|
||||
|
||||
//halfn frexp (halfn x, __generic intn *exp)
|
||||
|
||||
OVERLOADABLE half2 frexp (half2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE half3 frexp (half3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE half4 frexp (half4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE half8 frexp (half8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE half16 frexp (half16 param0, __generic int16 *param1);
|
||||
|
||||
//half frexp (half x, __generic int *exp)
|
||||
|
||||
|
||||
//doublen frexp (doublen x, __generic intn *exp)
|
||||
|
||||
OVERLOADABLE double2 frexp (double2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE double3 frexp (double3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE double4 frexp (double4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE double8 frexp (double8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE double16 frexp (double16 param0, __generic int16 *param1);
|
||||
|
||||
//double frexp (double x, __generic int *exp)
|
||||
|
||||
|
||||
//floatn lgamma_r (floatn x, __generic intn *signp)
|
||||
|
||||
OVERLOADABLE float2 lgamma_r (float2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE float3 lgamma_r (float3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE float4 lgamma_r (float4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE float8 lgamma_r (float8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE float16 lgamma_r (float16 param0, __generic int16 *param1);
|
||||
|
||||
//float lgamma_r (float x, __generic int *signp)
|
||||
|
||||
|
||||
//halfn lgamma_r (halfn x, __generic intn *signp)
|
||||
|
||||
OVERLOADABLE half2 lgamma_r (half2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE half3 lgamma_r (half3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE half4 lgamma_r (half4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE half8 lgamma_r (half8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE half16 lgamma_r (half16 param0, __generic int16 *param1);
|
||||
|
||||
//half lgamma_r (half x, __generic int *signp)
|
||||
|
||||
|
||||
//doublen lgamma_r (doublen x, __generic intn *signp)
|
||||
|
||||
OVERLOADABLE double2 lgamma_r (double2 param0, __generic int2 *param1);
|
||||
OVERLOADABLE double3 lgamma_r (double3 param0, __generic int3 *param1);
|
||||
OVERLOADABLE double4 lgamma_r (double4 param0, __generic int4 *param1);
|
||||
OVERLOADABLE double8 lgamma_r (double8 param0, __generic int8 *param1);
|
||||
OVERLOADABLE double16 lgamma_r (double16 param0, __generic int16 *param1);
|
||||
|
||||
//double lgamma_r (double x, __generic int *signp)
|
||||
|
||||
|
||||
//gentype modf (gentype x, __generic gentype *iptr)
|
||||
|
||||
OVERLOADABLE float2 modf (float2 param0, __generic float2 *param1);
|
||||
OVERLOADABLE float3 modf (float3 param0, __generic float3 *param1);
|
||||
OVERLOADABLE float4 modf (float4 param0, __generic float4 *param1);
|
||||
OVERLOADABLE float8 modf (float8 param0, __generic float8 *param1);
|
||||
OVERLOADABLE float16 modf (float16 param0, __generic float16 *param1);
|
||||
OVERLOADABLE double2 modf (double2 param0, __generic double2 *param1);
|
||||
OVERLOADABLE double3 modf (double3 param0, __generic double3 *param1);
|
||||
OVERLOADABLE double4 modf (double4 param0, __generic double4 *param1);
|
||||
OVERLOADABLE double8 modf (double8 param0, __generic double8 *param1);
|
||||
OVERLOADABLE double16 modf (double16 param0, __generic double16 *param1);
|
||||
OVERLOADABLE half2 modf (half2 param0, __generic half2 *param1);
|
||||
OVERLOADABLE half3 modf (half3 param0, __generic half3 *param1);
|
||||
OVERLOADABLE half4 modf (half4 param0, __generic half4 *param1);
|
||||
OVERLOADABLE half8 modf (half8 param0, __generic half8 *param1);
|
||||
OVERLOADABLE half16 modf (half16 param0, __generic half16 *param1);
|
||||
|
||||
//floatn remquo (floatn x, floatn y, __generic intn *quo)
|
||||
|
||||
OVERLOADABLE float2 remquo (float2 param0, float2 param1, __generic int2 *param2);
|
||||
OVERLOADABLE float3 remquo (float3 param0, float3 param1, __generic int3 *param2);
|
||||
OVERLOADABLE float4 remquo (float4 param0, float4 param1, __generic int4 *param2);
|
||||
OVERLOADABLE float8 remquo (float8 param0, float8 param1, __generic int8 *param2);
|
||||
OVERLOADABLE float16 remquo (float16 param0, float16 param1, __generic int16 *param2);
|
||||
|
||||
//float remquo (float x, float y, __generic int *quo)
|
||||
|
||||
|
||||
//halfn remquo (halfn x, halfn y, __generic intn *quo)
|
||||
|
||||
OVERLOADABLE half2 remquo (half2 param0, half2 param1, __generic int2 *param2);
|
||||
OVERLOADABLE half3 remquo (half3 param0, half3 param1, __generic int3 *param2);
|
||||
OVERLOADABLE half4 remquo (half4 param0, half4 param1, __generic int4 *param2);
|
||||
OVERLOADABLE half8 remquo (half8 param0, half8 param1, __generic int8 *param2);
|
||||
OVERLOADABLE half16 remquo (half16 param0, half16 param1, __generic int16 *param2);
|
||||
|
||||
//half remquo (half x, half y, __generic int *quo)
|
||||
|
||||
|
||||
//doublen remquo (doublen x, doublen y, __generic intn *quo)
|
||||
|
||||
OVERLOADABLE double2 remquo (double2 param0, double2 param1, __generic int2 *param2);
|
||||
OVERLOADABLE double3 remquo (double3 param0, double3 param1, __generic int3 *param2);
|
||||
OVERLOADABLE double4 remquo (double4 param0, double4 param1, __generic int4 *param2);
|
||||
OVERLOADABLE double8 remquo (double8 param0, double8 param1, __generic int8 *param2);
|
||||
OVERLOADABLE double16 remquo (double16 param0, double16 param1, __generic int16 *param2);
|
||||
|
||||
//double remquo (double x, double y, __generic int *quo)
|
||||
|
||||
|
||||
//gentype sincos (gentype x, __generic gentype *cosval)
|
||||
|
||||
OVERLOADABLE float2 sincos (float2 param0, __generic float2 *param1);
|
||||
OVERLOADABLE float3 sincos (float3 param0, __generic float3 *param1);
|
||||
OVERLOADABLE float4 sincos (float4 param0, __generic float4 *param1);
|
||||
OVERLOADABLE float8 sincos (float8 param0, __generic float8 *param1);
|
||||
OVERLOADABLE float16 sincos (float16 param0, __generic float16 *param1);
|
||||
OVERLOADABLE double2 sincos (double2 param0, __generic double2 *param1);
|
||||
OVERLOADABLE double3 sincos (double3 param0, __generic double3 *param1);
|
||||
OVERLOADABLE double4 sincos (double4 param0, __generic double4 *param1);
|
||||
OVERLOADABLE double8 sincos (double8 param0, __generic double8 *param1);
|
||||
OVERLOADABLE double16 sincos (double16 param0, __generic double16 *param1);
|
||||
OVERLOADABLE half2 sincos (half2 param0, __generic half2 *param1);
|
||||
OVERLOADABLE half3 sincos (half3 param0, __generic half3 *param1);
|
||||
OVERLOADABLE half4 sincos (half4 param0, __generic half4 *param1);
|
||||
OVERLOADABLE half8 sincos (half8 param0, __generic half8 *param1);
|
||||
OVERLOADABLE half16 sincos (half16 param0, __generic half16 *param1);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_MEMCPY_H__
|
||||
#define __OCL_MEMCPY_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// memcopy functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void __gen_memcpy_gg_align(__global uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_gp_align(__global uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_gl_align(__global uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_gc_align(__global uchar* dst, __constant uchar* src, size_t size);
|
||||
void __gen_memcpy_pg_align(__private uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_pp_align(__private uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_pl_align(__private uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_pc_align(__private uchar* dst, __constant uchar* src, size_t size);
|
||||
void __gen_memcpy_lg_align(__local uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_lp_align(__local uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_ll_align(__local uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_lc_align(__local uchar* dst, __constant uchar* src, size_t size);
|
||||
|
||||
void __gen_memcpy_gg(__global uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_gp(__global uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_gl(__global uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_gc(__global uchar* dst, __constant uchar* src, size_t size);
|
||||
void __gen_memcpy_pg(__private uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_pp(__private uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_pl(__private uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_pc(__private uchar* dst, __constant uchar* src, size_t size);
|
||||
void __gen_memcpy_lg(__local uchar* dst, __global uchar* src, size_t size);
|
||||
void __gen_memcpy_lp(__local uchar* dst, __private uchar* src, size_t size);
|
||||
void __gen_memcpy_ll(__local uchar* dst, __local uchar* src, size_t size);
|
||||
void __gen_memcpy_lc(__local uchar* dst, __constant uchar* src, size_t size);
|
||||
|
||||
#endif /* __OCL_MEMCPY_H__ */
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_MEMSET_H__
|
||||
#define __OCL_MEMSET_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// memcopy functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void __gen_memset_g_align(__global uchar* dst, uchar val, size_t size);
|
||||
void __gen_memset_p_align(__private uchar* dst, uchar val, size_t size);
|
||||
void __gen_memset_l_align(__local uchar* dst, uchar val, size_t size);
|
||||
|
||||
void __gen_memset_g(__global uchar* dst, uchar val, size_t size);
|
||||
void __gen_memset_p(__private uchar* dst, uchar val, size_t size);
|
||||
void __gen_memset_l(__local uchar* dst, uchar val, size_t size);
|
||||
|
||||
#endif /* __OCL_MEMSET_H__ */
|
||||
@@ -1,168 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_MISC_H__
|
||||
#define __OCL_MISC_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
#define DEC2(TYPE, XTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##2 shuffle(XTYPE x, MASKTYPE##2 mask);
|
||||
|
||||
#define DEC4(TYPE, XTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##4 shuffle(XTYPE x, MASKTYPE##4 mask);
|
||||
|
||||
#define DEC8(TYPE, XTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##8 shuffle(XTYPE x, MASKTYPE##8 mask);
|
||||
|
||||
#define DEC16(TYPE, XTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##16 shuffle(XTYPE x, MASKTYPE##16 mask);
|
||||
|
||||
#define DEFMASK(TYPE, MASKTYPE) \
|
||||
DEC2(TYPE, TYPE##2, MASKTYPE); DEC2(TYPE, TYPE##4, MASKTYPE); DEC2(TYPE, TYPE##8, MASKTYPE); DEC2(TYPE, TYPE##16, MASKTYPE) \
|
||||
DEC4(TYPE, TYPE##2, MASKTYPE); DEC4(TYPE, TYPE##4, MASKTYPE); DEC4(TYPE, TYPE##8, MASKTYPE); DEC4(TYPE, TYPE##16, MASKTYPE) \
|
||||
DEC8(TYPE, TYPE##2, MASKTYPE); DEC8(TYPE, TYPE##4, MASKTYPE); DEC8(TYPE, TYPE##8, MASKTYPE); DEC8(TYPE, TYPE##16, MASKTYPE) \
|
||||
DEC16(TYPE, TYPE##2, MASKTYPE); DEC16(TYPE, TYPE##4, MASKTYPE); DEC16(TYPE, TYPE##8, MASKTYPE); DEC16(TYPE, TYPE##16, MASKTYPE)
|
||||
|
||||
#define DEF(TYPE) \
|
||||
DEFMASK(TYPE, uchar) \
|
||||
DEFMASK(TYPE, ushort) \
|
||||
DEFMASK(TYPE, uint) \
|
||||
DEFMASK(TYPE, ulong)
|
||||
|
||||
DEF(char)
|
||||
DEF(uchar)
|
||||
DEF(short)
|
||||
DEF(ushort)
|
||||
DEF(half)
|
||||
DEF(int)
|
||||
DEF(uint)
|
||||
DEF(float)
|
||||
DEF(long)
|
||||
DEF(ulong)
|
||||
DEF(double)
|
||||
#undef DEF
|
||||
#undef DEFMASK
|
||||
#undef DEC2
|
||||
#undef DEC4
|
||||
#undef DEC8
|
||||
#undef DEC16
|
||||
|
||||
#define DEC2(TYPE, ARGTYPE, TEMPTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##2 shuffle2(ARGTYPE x, ARGTYPE y, MASKTYPE##2 mask);
|
||||
|
||||
#define DEC2X(TYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##2 shuffle2(TYPE##16 x, TYPE##16 y, MASKTYPE##2 mask);
|
||||
|
||||
#define DEC4(TYPE, ARGTYPE, TEMPTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##4 shuffle2(ARGTYPE x, ARGTYPE y, MASKTYPE##4 mask);
|
||||
|
||||
#define DEC4X(TYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##4 shuffle2(TYPE##16 x, TYPE##16 y, MASKTYPE##4 mask);
|
||||
|
||||
#define DEC8(TYPE, ARGTYPE, TEMPTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##8 shuffle2(ARGTYPE x, ARGTYPE y, MASKTYPE##8 mask);
|
||||
|
||||
#define DEC8X(TYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##8 shuffle2(TYPE##16 x, TYPE##16 y, MASKTYPE##8 mask);
|
||||
|
||||
#define DEC16(TYPE, ARGTYPE, TEMPTYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##16 shuffle2(ARGTYPE x, ARGTYPE y, MASKTYPE##16 mask);
|
||||
|
||||
#define DEC16X(TYPE, MASKTYPE) \
|
||||
OVERLOADABLE TYPE##16 shuffle2(TYPE##16 x, TYPE##16 y, MASKTYPE##16 mask);
|
||||
|
||||
#define DEFMASK(TYPE, MASKTYPE) \
|
||||
DEC2(TYPE, TYPE##2, TYPE##4, MASKTYPE) \
|
||||
DEC2(TYPE, TYPE##4, TYPE##8, MASKTYPE) \
|
||||
DEC2(TYPE, TYPE##8, TYPE##16, MASKTYPE) \
|
||||
DEC2X(TYPE, MASKTYPE) \
|
||||
DEC4(TYPE, TYPE##2, TYPE##4, MASKTYPE) \
|
||||
DEC4(TYPE, TYPE##4, TYPE##8, MASKTYPE) \
|
||||
DEC4(TYPE, TYPE##8, TYPE##16, MASKTYPE) \
|
||||
DEC4X(TYPE, MASKTYPE) \
|
||||
DEC8(TYPE, TYPE##2, TYPE##4, MASKTYPE) \
|
||||
DEC8(TYPE, TYPE##4, TYPE##8, MASKTYPE) \
|
||||
DEC8(TYPE, TYPE##8, TYPE##16, MASKTYPE) \
|
||||
DEC8X(TYPE, MASKTYPE) \
|
||||
DEC16(TYPE, TYPE##2, TYPE##4, MASKTYPE) \
|
||||
DEC16(TYPE, TYPE##4, TYPE##8, MASKTYPE) \
|
||||
DEC16(TYPE, TYPE##8, TYPE##16, MASKTYPE) \
|
||||
DEC16X(TYPE, MASKTYPE)
|
||||
|
||||
#define DEF(TYPE) \
|
||||
DEFMASK(TYPE, uchar) \
|
||||
DEFMASK(TYPE, ushort) \
|
||||
DEFMASK(TYPE, uint) \
|
||||
DEFMASK(TYPE, ulong)
|
||||
|
||||
DEF(char)
|
||||
DEF(uchar)
|
||||
DEF(short)
|
||||
DEF(ushort)
|
||||
DEF(half)
|
||||
DEF(int)
|
||||
DEF(uint)
|
||||
DEF(float)
|
||||
DEF(long)
|
||||
DEF(ulong)
|
||||
DEF(double)
|
||||
#undef DEF
|
||||
#undef DEFMASK
|
||||
#undef DEC2
|
||||
#undef DEC2X
|
||||
#undef DEC4
|
||||
#undef DEC4X
|
||||
#undef DEC8
|
||||
#undef DEC8X
|
||||
#undef DEC16
|
||||
#undef DEC16X
|
||||
|
||||
struct time_stamp {
|
||||
// time tick
|
||||
ulong tick;
|
||||
// If context-switch or frequency change occurs since last read of tm,
|
||||
// event will be non-zero, otherwise, it will be zero.
|
||||
uint event;
|
||||
};
|
||||
|
||||
uint __gen_ocl_region(ushort offset, uint data);
|
||||
|
||||
struct time_stamp __gen_ocl_get_timestamp(void);
|
||||
|
||||
uint8 __gen_ocl_vme(image2d_t, image2d_t,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
uint, uint, uint, uint,
|
||||
int, int, int);
|
||||
|
||||
bool __gen_ocl_in_local(size_t p);
|
||||
bool __gen_ocl_in_private(size_t p);
|
||||
|
||||
#if (__OPENCL_C_VERSION__ >= 200 && __OPENCL_C_VERSION__ < 300)
|
||||
local void *__to_local(generic void *p);
|
||||
global void *__to_global(generic void *p);
|
||||
private void *__to_private(generic void *p);
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_PIPE_H__
|
||||
#define __OCL_PIPE_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
#include "ocl_work_group.h"
|
||||
#include "ocl_simd.h"
|
||||
|
||||
/* The pipe read function. */
|
||||
int __read_pipe_2(pipe int p, __generic void* dst);
|
||||
int __read_pipe_4(pipe int p, reserve_id_t id, uint index, void* dst);
|
||||
reserve_id_t __reserve_read_pipe(pipe int p, uint num);
|
||||
void __commit_read_pipe(pipe int p, reserve_id_t rid);
|
||||
reserve_id_t __work_group_reserve_read_pipe(pipe int p, uint num);
|
||||
void __work_group_commit_read_pipe(pipe int p, reserve_id_t rid);
|
||||
reserve_id_t __sub_group_reserve_read_pipe(pipe int p, uint num);
|
||||
void __sub_group_commit_read_pipe(pipe int p, reserve_id_t rid);
|
||||
|
||||
/* The pipe write function. */
|
||||
int __write_pipe_2(pipe int p, __generic void* src);
|
||||
int __write_pipe_4(pipe int p, reserve_id_t id, uint index, void* src);
|
||||
reserve_id_t __reserve_write_pipe(pipe int p, uint num);
|
||||
void __commit_write_pipe(pipe int p, reserve_id_t rid);
|
||||
reserve_id_t __work_group_reserve_write_pipe(pipe int p, uint num);
|
||||
void __work_group_commit_write_pipe(pipe int p, reserve_id_t rid);
|
||||
reserve_id_t __sub_group_reserve_write_pipe(pipe int p, uint num);
|
||||
void __sub_group_commit_write_pipe(pipe int p, reserve_id_t rid);
|
||||
|
||||
/* The reserve_id_t function. */
|
||||
bool is_valid_reserve_id(reserve_id_t rid);
|
||||
|
||||
/* The pipe query function. */
|
||||
uint __get_pipe_num_packets(pipe int p);
|
||||
uint __get_pipe_max_packets(pipe int p);
|
||||
#endif
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_PRINTF_H__
|
||||
#define __OCL_PRINTF_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/* The printf function. */
|
||||
/* From LLVM 3.4, c string are all in constant address space */
|
||||
#if 100*__clang_major__ + __clang_minor__ < 304
|
||||
int __gen_ocl_printf_stub(const char * format, ...);
|
||||
int __gen_ocl_puts_stub(const char * format);
|
||||
#else
|
||||
int __gen_ocl_printf_stub(constant char * format, ...);
|
||||
int __gen_ocl_puts_stub(constant char * format);
|
||||
#endif
|
||||
#define printf __gen_ocl_printf_stub
|
||||
#define puts __gen_ocl_puts_stub
|
||||
|
||||
#endif
|
||||
@@ -1,677 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_RELATIONAL_H__
|
||||
#define __OCL_RELATIONAL_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
#include "ocl_as.h"
|
||||
|
||||
OVERLOADABLE int isequal(float x, float y);
|
||||
OVERLOADABLE int isnotequal(float x, float y);
|
||||
OVERLOADABLE int isgreater(float x, float y);
|
||||
OVERLOADABLE int isgreaterequal(float x, float y);
|
||||
OVERLOADABLE int isless(float x, float y);
|
||||
OVERLOADABLE int islessequal(float x, float y);
|
||||
OVERLOADABLE int islessgreater(float x, float y);
|
||||
|
||||
OVERLOADABLE int isfinite(float x);
|
||||
OVERLOADABLE int isinf(float x);
|
||||
OVERLOADABLE int isnan(float x);
|
||||
OVERLOADABLE int isnormal(float x);
|
||||
|
||||
OVERLOADABLE int isordered(float x, float y);
|
||||
OVERLOADABLE int isunordered(float x, float y);
|
||||
OVERLOADABLE int signbit(float x);
|
||||
|
||||
// Half half version.
|
||||
OVERLOADABLE int isequal(half x, half y);
|
||||
OVERLOADABLE int isnotequal(half x, half y);
|
||||
OVERLOADABLE int isgreater(half x, half y);
|
||||
OVERLOADABLE int isgreaterequal(half x, half y);
|
||||
OVERLOADABLE int isless(half x, half y);
|
||||
OVERLOADABLE int islessequal(half x, half y);
|
||||
OVERLOADABLE int islessgreater(half x, half y);
|
||||
|
||||
OVERLOADABLE int isfinite(half x);
|
||||
OVERLOADABLE int isinf(half x);
|
||||
OVERLOADABLE int isnan(half x);
|
||||
OVERLOADABLE int isnormal(half x);
|
||||
|
||||
OVERLOADABLE int isordered(half x, half y);
|
||||
OVERLOADABLE int isunordered(half x, half y);
|
||||
OVERLOADABLE int signbit(half x);
|
||||
|
||||
OVERLOADABLE int isequal(double x, double y);
|
||||
OVERLOADABLE int isnotequal(double x, double y);
|
||||
OVERLOADABLE int isgreater(double x, double y);
|
||||
OVERLOADABLE int isgreaterequal(double x, double y);
|
||||
OVERLOADABLE int isless(double x, double y);
|
||||
OVERLOADABLE int islessequal(double x, double y);
|
||||
OVERLOADABLE int islessgreater(double x, double y);
|
||||
|
||||
OVERLOADABLE int isfinite(double x);
|
||||
OVERLOADABLE int isinf(double x);
|
||||
OVERLOADABLE int isnan(double x);
|
||||
OVERLOADABLE int isnormal(double x);
|
||||
|
||||
OVERLOADABLE int isordered(double x, double y);
|
||||
OVERLOADABLE int isunordered(double x, double y);
|
||||
OVERLOADABLE int signbit(double x);
|
||||
|
||||
// any
|
||||
#define DEC1(type) OVERLOADABLE int any(type a);
|
||||
#define DEC2(type) OVERLOADABLE int any(type a);
|
||||
#define DEC3(type) OVERLOADABLE int any(type a);
|
||||
#define DEC4(type) OVERLOADABLE int any(type a);
|
||||
#define DEC8(type) OVERLOADABLE int any(type a);
|
||||
#define DEC16(type) OVERLOADABLE int any(type a);
|
||||
DEC1(char);
|
||||
DEC1(short);
|
||||
DEC1(int);
|
||||
DEC1(long);
|
||||
#define DEC(n) DEC##n(char##n); DEC##n(short##n); DEC##n(int##n); DEC##n(long##n);
|
||||
DEC(2);
|
||||
DEC(3);
|
||||
DEC(4);
|
||||
DEC(8);
|
||||
DEC(16);
|
||||
#undef DEC
|
||||
#undef DEC1
|
||||
#undef DEC2
|
||||
#undef DEC3
|
||||
#undef DEC4
|
||||
#undef DEC8
|
||||
#undef DEC16
|
||||
|
||||
// all
|
||||
#define DEC1(type) OVERLOADABLE int all(type a);
|
||||
#define DEC2(type) OVERLOADABLE int all(type a);
|
||||
#define DEC3(type) OVERLOADABLE int all(type a);
|
||||
#define DEC4(type) OVERLOADABLE int all(type a);
|
||||
#define DEC8(type) OVERLOADABLE int all(type a);
|
||||
#define DEC16(type) OVERLOADABLE int all(type a);
|
||||
DEC1(char)
|
||||
DEC1(short)
|
||||
DEC1(int)
|
||||
DEC1(long)
|
||||
#define DEC(n) DEC##n(char##n) DEC##n(short##n) DEC##n(int##n) DEC##n(long##n)
|
||||
DEC(2)
|
||||
DEC(3)
|
||||
DEC(4)
|
||||
DEC(8)
|
||||
DEC(16)
|
||||
#undef DEC
|
||||
#undef DEC1
|
||||
#undef DEC2
|
||||
#undef DEC3
|
||||
#undef DEC4
|
||||
#undef DEC8
|
||||
#undef DEC16
|
||||
|
||||
#define DEF(type) OVERLOADABLE type bitselect(type a, type b, type c);
|
||||
DEF(char) DEF(uchar) DEF(short) DEF(ushort) DEF(int) DEF(uint)
|
||||
DEF(long) DEF(ulong)
|
||||
#undef DEF
|
||||
OVERLOADABLE float bitselect(float a, float b, float c);
|
||||
OVERLOADABLE half bitselect(half a, half b, half c);
|
||||
OVERLOADABLE double bitselect(double a, double b, double c);
|
||||
|
||||
|
||||
#define DEF(TYPE1, TYPE2) \
|
||||
OVERLOADABLE TYPE1 select(TYPE1 src0, TYPE1 src1, TYPE2 cond);
|
||||
DEF(char, char)
|
||||
DEF(char, uchar)
|
||||
DEF(uchar, char)
|
||||
DEF(uchar, uchar)
|
||||
DEF(short, short)
|
||||
DEF(short, ushort)
|
||||
DEF(ushort, short)
|
||||
DEF(ushort, ushort)
|
||||
DEF(int, int)
|
||||
DEF(int, uint)
|
||||
DEF(uint, int)
|
||||
DEF(uint, uint)
|
||||
DEF(long, long)
|
||||
DEF(long, ulong)
|
||||
DEF(ulong, long)
|
||||
DEF(ulong, ulong)
|
||||
DEF(float, int)
|
||||
DEF(float, uint)
|
||||
DEF(half, short)
|
||||
DEF(half, ushort)
|
||||
#undef DEF
|
||||
//Begin from this part is autogenerated.
|
||||
//Don't modify it manually.
|
||||
//relational builtin functions
|
||||
//intn isequal (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isequal (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isequal (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isequal (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isequal (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isequal (float16 param0, float16 param1);
|
||||
|
||||
//shortn isequal (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isequal (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isequal (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isequal (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isequal (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isequal (half16 param0, half16 param1);
|
||||
|
||||
//longn isequal (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isequal (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isequal (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isequal (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isequal (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isequal (double16 param0, double16 param1);
|
||||
|
||||
//intn isnotequal (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isnotequal (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isnotequal (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isnotequal (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isnotequal (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isnotequal (float16 param0, float16 param1);
|
||||
|
||||
//shortn isnotequal (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isnotequal (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isnotequal (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isnotequal (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isnotequal (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isnotequal (half16 param0, half16 param1);
|
||||
|
||||
//longn isnotequal (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isnotequal (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isnotequal (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isnotequal (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isnotequal (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isnotequal (double16 param0, double16 param1);
|
||||
|
||||
//intn isgreater (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isgreater (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isgreater (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isgreater (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isgreater (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isgreater (float16 param0, float16 param1);
|
||||
|
||||
//shortn isgreater (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isgreater (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isgreater (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isgreater (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isgreater (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isgreater (half16 param0, half16 param1);
|
||||
|
||||
//longn isgreater (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isgreater (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isgreater (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isgreater (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isgreater (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isgreater (double16 param0, double16 param1);
|
||||
|
||||
//intn isgreaterequal (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isgreaterequal (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isgreaterequal (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isgreaterequal (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isgreaterequal (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isgreaterequal (float16 param0, float16 param1);
|
||||
|
||||
//shortn isgreaterequal (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isgreaterequal (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isgreaterequal (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isgreaterequal (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isgreaterequal (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isgreaterequal (half16 param0, half16 param1);
|
||||
|
||||
//longn isgreaterequal (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isgreaterequal (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isgreaterequal (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isgreaterequal (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isgreaterequal (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isgreaterequal (double16 param0, double16 param1);
|
||||
|
||||
//intn isless (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isless (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isless (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isless (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isless (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isless (float16 param0, float16 param1);
|
||||
|
||||
//shortn isless (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isless (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isless (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isless (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isless (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isless (half16 param0, half16 param1);
|
||||
|
||||
//longn isless (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isless (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isless (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isless (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isless (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isless (double16 param0, double16 param1);
|
||||
|
||||
//intn islessequal (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 islessequal (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 islessequal (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 islessequal (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 islessequal (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 islessequal (float16 param0, float16 param1);
|
||||
|
||||
//shortn islessequal (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 islessequal (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 islessequal (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 islessequal (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 islessequal (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 islessequal (half16 param0, half16 param1);
|
||||
|
||||
//longn islessequal (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 islessequal (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 islessequal (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 islessequal (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 islessequal (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 islessequal (double16 param0, double16 param1);
|
||||
|
||||
//intn islessgreater (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 islessgreater (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 islessgreater (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 islessgreater (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 islessgreater (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 islessgreater (float16 param0, float16 param1);
|
||||
|
||||
//shortn islessgreater (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 islessgreater (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 islessgreater (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 islessgreater (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 islessgreater (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 islessgreater (half16 param0, half16 param1);
|
||||
|
||||
//longn islessgreater (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 islessgreater (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 islessgreater (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 islessgreater (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 islessgreater (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 islessgreater (double16 param0, double16 param1);
|
||||
|
||||
//intn isfinite (floatn)
|
||||
|
||||
OVERLOADABLE int2 isfinite (float2 param0);
|
||||
OVERLOADABLE int3 isfinite (float3 param0);
|
||||
OVERLOADABLE int4 isfinite (float4 param0);
|
||||
OVERLOADABLE int8 isfinite (float8 param0);
|
||||
OVERLOADABLE int16 isfinite (float16 param0);
|
||||
|
||||
//shortn isfinite (halfn)
|
||||
|
||||
OVERLOADABLE short2 isfinite (half2 param0);
|
||||
OVERLOADABLE short3 isfinite (half3 param0);
|
||||
OVERLOADABLE short4 isfinite (half4 param0);
|
||||
OVERLOADABLE short8 isfinite (half8 param0);
|
||||
OVERLOADABLE short16 isfinite (half16 param0);
|
||||
|
||||
//longn isfinite (doublen)
|
||||
|
||||
OVERLOADABLE long2 isfinite (double2 param0);
|
||||
OVERLOADABLE long3 isfinite (double3 param0);
|
||||
OVERLOADABLE long4 isfinite (double4 param0);
|
||||
OVERLOADABLE long8 isfinite (double8 param0);
|
||||
OVERLOADABLE long16 isfinite (double16 param0);
|
||||
|
||||
//intn isinf (floatn)
|
||||
|
||||
OVERLOADABLE int2 isinf (float2 param0);
|
||||
OVERLOADABLE int3 isinf (float3 param0);
|
||||
OVERLOADABLE int4 isinf (float4 param0);
|
||||
OVERLOADABLE int8 isinf (float8 param0);
|
||||
OVERLOADABLE int16 isinf (float16 param0);
|
||||
|
||||
//shortn isinf (halfn)
|
||||
|
||||
OVERLOADABLE short2 isinf (half2 param0);
|
||||
OVERLOADABLE short3 isinf (half3 param0);
|
||||
OVERLOADABLE short4 isinf (half4 param0);
|
||||
OVERLOADABLE short8 isinf (half8 param0);
|
||||
OVERLOADABLE short16 isinf (half16 param0);
|
||||
|
||||
//longn isinf (doublen)
|
||||
|
||||
OVERLOADABLE long2 isinf (double2 param0);
|
||||
OVERLOADABLE long3 isinf (double3 param0);
|
||||
OVERLOADABLE long4 isinf (double4 param0);
|
||||
OVERLOADABLE long8 isinf (double8 param0);
|
||||
OVERLOADABLE long16 isinf (double16 param0);
|
||||
|
||||
//intn isnan (floatn)
|
||||
|
||||
OVERLOADABLE int2 isnan (float2 param0);
|
||||
OVERLOADABLE int3 isnan (float3 param0);
|
||||
OVERLOADABLE int4 isnan (float4 param0);
|
||||
OVERLOADABLE int8 isnan (float8 param0);
|
||||
OVERLOADABLE int16 isnan (float16 param0);
|
||||
|
||||
//shortn isnan (halfn)
|
||||
|
||||
OVERLOADABLE short2 isnan (half2 param0);
|
||||
OVERLOADABLE short3 isnan (half3 param0);
|
||||
OVERLOADABLE short4 isnan (half4 param0);
|
||||
OVERLOADABLE short8 isnan (half8 param0);
|
||||
OVERLOADABLE short16 isnan (half16 param0);
|
||||
|
||||
//longn isnan (doublen)
|
||||
|
||||
OVERLOADABLE long2 isnan (double2 param0);
|
||||
OVERLOADABLE long3 isnan (double3 param0);
|
||||
OVERLOADABLE long4 isnan (double4 param0);
|
||||
OVERLOADABLE long8 isnan (double8 param0);
|
||||
OVERLOADABLE long16 isnan (double16 param0);
|
||||
|
||||
//intn isnormal (floatn)
|
||||
|
||||
OVERLOADABLE int2 isnormal (float2 param0);
|
||||
OVERLOADABLE int3 isnormal (float3 param0);
|
||||
OVERLOADABLE int4 isnormal (float4 param0);
|
||||
OVERLOADABLE int8 isnormal (float8 param0);
|
||||
OVERLOADABLE int16 isnormal (float16 param0);
|
||||
|
||||
//shortn isnormal (halfn)
|
||||
|
||||
OVERLOADABLE short2 isnormal (half2 param0);
|
||||
OVERLOADABLE short3 isnormal (half3 param0);
|
||||
OVERLOADABLE short4 isnormal (half4 param0);
|
||||
OVERLOADABLE short8 isnormal (half8 param0);
|
||||
OVERLOADABLE short16 isnormal (half16 param0);
|
||||
|
||||
//longn isnormal (doublen)
|
||||
|
||||
OVERLOADABLE long2 isnormal (double2 param0);
|
||||
OVERLOADABLE long3 isnormal (double3 param0);
|
||||
OVERLOADABLE long4 isnormal (double4 param0);
|
||||
OVERLOADABLE long8 isnormal (double8 param0);
|
||||
OVERLOADABLE long16 isnormal (double16 param0);
|
||||
|
||||
//intn isordered (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isordered (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isordered (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isordered (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isordered (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isordered (float16 param0, float16 param1);
|
||||
|
||||
//shortn isordered (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isordered (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isordered (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isordered (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isordered (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isordered (half16 param0, half16 param1);
|
||||
|
||||
//longn isordered (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isordered (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isordered (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isordered (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isordered (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isordered (double16 param0, double16 param1);
|
||||
|
||||
//intn isunordered (floatn x, floatn y)
|
||||
|
||||
OVERLOADABLE int2 isunordered (float2 param0, float2 param1);
|
||||
OVERLOADABLE int3 isunordered (float3 param0, float3 param1);
|
||||
OVERLOADABLE int4 isunordered (float4 param0, float4 param1);
|
||||
OVERLOADABLE int8 isunordered (float8 param0, float8 param1);
|
||||
OVERLOADABLE int16 isunordered (float16 param0, float16 param1);
|
||||
|
||||
//shortn isunordered (halfn x, halfn y)
|
||||
|
||||
OVERLOADABLE short2 isunordered (half2 param0, half2 param1);
|
||||
OVERLOADABLE short3 isunordered (half3 param0, half3 param1);
|
||||
OVERLOADABLE short4 isunordered (half4 param0, half4 param1);
|
||||
OVERLOADABLE short8 isunordered (half8 param0, half8 param1);
|
||||
OVERLOADABLE short16 isunordered (half16 param0, half16 param1);
|
||||
|
||||
//longn isunordered (doublen x, doublen y)
|
||||
|
||||
OVERLOADABLE long2 isunordered (double2 param0, double2 param1);
|
||||
OVERLOADABLE long3 isunordered (double3 param0, double3 param1);
|
||||
OVERLOADABLE long4 isunordered (double4 param0, double4 param1);
|
||||
OVERLOADABLE long8 isunordered (double8 param0, double8 param1);
|
||||
OVERLOADABLE long16 isunordered (double16 param0, double16 param1);
|
||||
|
||||
//intn signbit (floatn)
|
||||
|
||||
OVERLOADABLE int2 signbit (float2 param0);
|
||||
OVERLOADABLE int3 signbit (float3 param0);
|
||||
OVERLOADABLE int4 signbit (float4 param0);
|
||||
OVERLOADABLE int8 signbit (float8 param0);
|
||||
OVERLOADABLE int16 signbit (float16 param0);
|
||||
|
||||
//shortn signbit (halfn)
|
||||
|
||||
OVERLOADABLE short2 signbit (half2 param0);
|
||||
OVERLOADABLE short3 signbit (half3 param0);
|
||||
OVERLOADABLE short4 signbit (half4 param0);
|
||||
OVERLOADABLE short8 signbit (half8 param0);
|
||||
OVERLOADABLE short16 signbit (half16 param0);
|
||||
|
||||
//longn signbit (doublen)
|
||||
|
||||
OVERLOADABLE long2 signbit (double2 param0);
|
||||
OVERLOADABLE long3 signbit (double3 param0);
|
||||
OVERLOADABLE long4 signbit (double4 param0);
|
||||
OVERLOADABLE long8 signbit (double8 param0);
|
||||
OVERLOADABLE long16 signbit (double16 param0);
|
||||
|
||||
//int any (igentype x)
|
||||
|
||||
|
||||
//int all (igentype x)
|
||||
|
||||
|
||||
//gentype bitselect (gentype a, gentype b, gentype c)
|
||||
|
||||
OVERLOADABLE char2 bitselect (char2 param0, char2 param1, char2 param2);
|
||||
OVERLOADABLE char3 bitselect (char3 param0, char3 param1, char3 param2);
|
||||
OVERLOADABLE char4 bitselect (char4 param0, char4 param1, char4 param2);
|
||||
OVERLOADABLE char8 bitselect (char8 param0, char8 param1, char8 param2);
|
||||
OVERLOADABLE char16 bitselect (char16 param0, char16 param1, char16 param2);
|
||||
OVERLOADABLE short2 bitselect (short2 param0, short2 param1, short2 param2);
|
||||
OVERLOADABLE short3 bitselect (short3 param0, short3 param1, short3 param2);
|
||||
OVERLOADABLE short4 bitselect (short4 param0, short4 param1, short4 param2);
|
||||
OVERLOADABLE short8 bitselect (short8 param0, short8 param1, short8 param2);
|
||||
OVERLOADABLE short16 bitselect (short16 param0, short16 param1, short16 param2);
|
||||
OVERLOADABLE int2 bitselect (int2 param0, int2 param1, int2 param2);
|
||||
OVERLOADABLE int3 bitselect (int3 param0, int3 param1, int3 param2);
|
||||
OVERLOADABLE int4 bitselect (int4 param0, int4 param1, int4 param2);
|
||||
OVERLOADABLE int8 bitselect (int8 param0, int8 param1, int8 param2);
|
||||
OVERLOADABLE int16 bitselect (int16 param0, int16 param1, int16 param2);
|
||||
OVERLOADABLE long2 bitselect (long2 param0, long2 param1, long2 param2);
|
||||
OVERLOADABLE long3 bitselect (long3 param0, long3 param1, long3 param2);
|
||||
OVERLOADABLE long4 bitselect (long4 param0, long4 param1, long4 param2);
|
||||
OVERLOADABLE long8 bitselect (long8 param0, long8 param1, long8 param2);
|
||||
OVERLOADABLE long16 bitselect (long16 param0, long16 param1, long16 param2);
|
||||
OVERLOADABLE uchar2 bitselect (uchar2 param0, uchar2 param1, uchar2 param2);
|
||||
OVERLOADABLE uchar3 bitselect (uchar3 param0, uchar3 param1, uchar3 param2);
|
||||
OVERLOADABLE uchar4 bitselect (uchar4 param0, uchar4 param1, uchar4 param2);
|
||||
OVERLOADABLE uchar8 bitselect (uchar8 param0, uchar8 param1, uchar8 param2);
|
||||
OVERLOADABLE uchar16 bitselect (uchar16 param0, uchar16 param1, uchar16 param2);
|
||||
OVERLOADABLE ushort2 bitselect (ushort2 param0, ushort2 param1, ushort2 param2);
|
||||
OVERLOADABLE ushort3 bitselect (ushort3 param0, ushort3 param1, ushort3 param2);
|
||||
OVERLOADABLE ushort4 bitselect (ushort4 param0, ushort4 param1, ushort4 param2);
|
||||
OVERLOADABLE ushort8 bitselect (ushort8 param0, ushort8 param1, ushort8 param2);
|
||||
OVERLOADABLE ushort16 bitselect (ushort16 param0, ushort16 param1, ushort16 param2);
|
||||
OVERLOADABLE uint2 bitselect (uint2 param0, uint2 param1, uint2 param2);
|
||||
OVERLOADABLE uint3 bitselect (uint3 param0, uint3 param1, uint3 param2);
|
||||
OVERLOADABLE uint4 bitselect (uint4 param0, uint4 param1, uint4 param2);
|
||||
OVERLOADABLE uint8 bitselect (uint8 param0, uint8 param1, uint8 param2);
|
||||
OVERLOADABLE uint16 bitselect (uint16 param0, uint16 param1, uint16 param2);
|
||||
OVERLOADABLE ulong2 bitselect (ulong2 param0, ulong2 param1, ulong2 param2);
|
||||
OVERLOADABLE ulong3 bitselect (ulong3 param0, ulong3 param1, ulong3 param2);
|
||||
OVERLOADABLE ulong4 bitselect (ulong4 param0, ulong4 param1, ulong4 param2);
|
||||
OVERLOADABLE ulong8 bitselect (ulong8 param0, ulong8 param1, ulong8 param2);
|
||||
OVERLOADABLE ulong16 bitselect (ulong16 param0, ulong16 param1, ulong16 param2);
|
||||
OVERLOADABLE float2 bitselect (float2 param0, float2 param1, float2 param2);
|
||||
OVERLOADABLE float3 bitselect (float3 param0, float3 param1, float3 param2);
|
||||
OVERLOADABLE float4 bitselect (float4 param0, float4 param1, float4 param2);
|
||||
OVERLOADABLE float8 bitselect (float8 param0, float8 param1, float8 param2);
|
||||
OVERLOADABLE float16 bitselect (float16 param0, float16 param1, float16 param2);
|
||||
OVERLOADABLE double2 bitselect (double2 param0, double2 param1, double2 param2);
|
||||
OVERLOADABLE double3 bitselect (double3 param0, double3 param1, double3 param2);
|
||||
OVERLOADABLE double4 bitselect (double4 param0, double4 param1, double4 param2);
|
||||
OVERLOADABLE double8 bitselect (double8 param0, double8 param1, double8 param2);
|
||||
OVERLOADABLE double16 bitselect (double16 param0, double16 param1, double16 param2);
|
||||
OVERLOADABLE half2 bitselect (half2 param0, half2 param1, half2 param2);
|
||||
OVERLOADABLE half3 bitselect (half3 param0, half3 param1, half3 param2);
|
||||
OVERLOADABLE half4 bitselect (half4 param0, half4 param1, half4 param2);
|
||||
OVERLOADABLE half8 bitselect (half8 param0, half8 param1, half8 param2);
|
||||
OVERLOADABLE half16 bitselect (half16 param0, half16 param1, half16 param2);
|
||||
|
||||
//gentype select (gentype a, gentype b, igentype c)
|
||||
|
||||
OVERLOADABLE char2 select (char2 param0, char2 param1, char2 param2);
|
||||
OVERLOADABLE char3 select (char3 param0, char3 param1, char3 param2);
|
||||
OVERLOADABLE char4 select (char4 param0, char4 param1, char4 param2);
|
||||
OVERLOADABLE char8 select (char8 param0, char8 param1, char8 param2);
|
||||
OVERLOADABLE char16 select (char16 param0, char16 param1, char16 param2);
|
||||
OVERLOADABLE short2 select (short2 param0, short2 param1, short2 param2);
|
||||
OVERLOADABLE short3 select (short3 param0, short3 param1, short3 param2);
|
||||
OVERLOADABLE short4 select (short4 param0, short4 param1, short4 param2);
|
||||
OVERLOADABLE short8 select (short8 param0, short8 param1, short8 param2);
|
||||
OVERLOADABLE short16 select (short16 param0, short16 param1, short16 param2);
|
||||
OVERLOADABLE int2 select (int2 param0, int2 param1, int2 param2);
|
||||
OVERLOADABLE int3 select (int3 param0, int3 param1, int3 param2);
|
||||
OVERLOADABLE int4 select (int4 param0, int4 param1, int4 param2);
|
||||
OVERLOADABLE int8 select (int8 param0, int8 param1, int8 param2);
|
||||
OVERLOADABLE int16 select (int16 param0, int16 param1, int16 param2);
|
||||
OVERLOADABLE long2 select (long2 param0, long2 param1, long2 param2);
|
||||
OVERLOADABLE long3 select (long3 param0, long3 param1, long3 param2);
|
||||
OVERLOADABLE long4 select (long4 param0, long4 param1, long4 param2);
|
||||
OVERLOADABLE long8 select (long8 param0, long8 param1, long8 param2);
|
||||
OVERLOADABLE long16 select (long16 param0, long16 param1, long16 param2);
|
||||
OVERLOADABLE uchar2 select (uchar2 param0, uchar2 param1, char2 param2);
|
||||
OVERLOADABLE uchar3 select (uchar3 param0, uchar3 param1, char3 param2);
|
||||
OVERLOADABLE uchar4 select (uchar4 param0, uchar4 param1, char4 param2);
|
||||
OVERLOADABLE uchar8 select (uchar8 param0, uchar8 param1, char8 param2);
|
||||
OVERLOADABLE uchar16 select (uchar16 param0, uchar16 param1, char16 param2);
|
||||
OVERLOADABLE ushort2 select (ushort2 param0, ushort2 param1, short2 param2);
|
||||
OVERLOADABLE ushort3 select (ushort3 param0, ushort3 param1, short3 param2);
|
||||
OVERLOADABLE ushort4 select (ushort4 param0, ushort4 param1, short4 param2);
|
||||
OVERLOADABLE ushort8 select (ushort8 param0, ushort8 param1, short8 param2);
|
||||
OVERLOADABLE ushort16 select (ushort16 param0, ushort16 param1, short16 param2);
|
||||
OVERLOADABLE uint2 select (uint2 param0, uint2 param1, int2 param2);
|
||||
OVERLOADABLE uint3 select (uint3 param0, uint3 param1, int3 param2);
|
||||
OVERLOADABLE uint4 select (uint4 param0, uint4 param1, int4 param2);
|
||||
OVERLOADABLE uint8 select (uint8 param0, uint8 param1, int8 param2);
|
||||
OVERLOADABLE uint16 select (uint16 param0, uint16 param1, int16 param2);
|
||||
OVERLOADABLE ulong2 select (ulong2 param0, ulong2 param1, long2 param2);
|
||||
OVERLOADABLE ulong3 select (ulong3 param0, ulong3 param1, long3 param2);
|
||||
OVERLOADABLE ulong4 select (ulong4 param0, ulong4 param1, long4 param2);
|
||||
OVERLOADABLE ulong8 select (ulong8 param0, ulong8 param1, long8 param2);
|
||||
OVERLOADABLE ulong16 select (ulong16 param0, ulong16 param1, long16 param2);
|
||||
OVERLOADABLE float2 select (float2 param0, float2 param1, int2 param2);
|
||||
OVERLOADABLE float3 select (float3 param0, float3 param1, int3 param2);
|
||||
OVERLOADABLE float4 select (float4 param0, float4 param1, int4 param2);
|
||||
OVERLOADABLE float8 select (float8 param0, float8 param1, int8 param2);
|
||||
OVERLOADABLE float16 select (float16 param0, float16 param1, int16 param2);
|
||||
OVERLOADABLE double2 select (double2 param0, double2 param1, long2 param2);
|
||||
OVERLOADABLE double3 select (double3 param0, double3 param1, long3 param2);
|
||||
OVERLOADABLE double4 select (double4 param0, double4 param1, long4 param2);
|
||||
OVERLOADABLE double8 select (double8 param0, double8 param1, long8 param2);
|
||||
OVERLOADABLE double16 select (double16 param0, double16 param1, long16 param2);
|
||||
OVERLOADABLE half2 select (half2 param0, half2 param1, short2 param2);
|
||||
OVERLOADABLE half3 select (half3 param0, half3 param1, short3 param2);
|
||||
OVERLOADABLE half4 select (half4 param0, half4 param1, short4 param2);
|
||||
OVERLOADABLE half8 select (half8 param0, half8 param1, short8 param2);
|
||||
OVERLOADABLE half16 select (half16 param0, half16 param1, short16 param2);
|
||||
|
||||
//gentype select (gentype a, gentype b, ugentype c)
|
||||
|
||||
OVERLOADABLE char2 select (char2 param0, char2 param1, uchar2 param2);
|
||||
OVERLOADABLE char3 select (char3 param0, char3 param1, uchar3 param2);
|
||||
OVERLOADABLE char4 select (char4 param0, char4 param1, uchar4 param2);
|
||||
OVERLOADABLE char8 select (char8 param0, char8 param1, uchar8 param2);
|
||||
OVERLOADABLE char16 select (char16 param0, char16 param1, uchar16 param2);
|
||||
OVERLOADABLE short2 select (short2 param0, short2 param1, ushort2 param2);
|
||||
OVERLOADABLE short3 select (short3 param0, short3 param1, ushort3 param2);
|
||||
OVERLOADABLE short4 select (short4 param0, short4 param1, ushort4 param2);
|
||||
OVERLOADABLE short8 select (short8 param0, short8 param1, ushort8 param2);
|
||||
OVERLOADABLE short16 select (short16 param0, short16 param1, ushort16 param2);
|
||||
OVERLOADABLE int2 select (int2 param0, int2 param1, uint2 param2);
|
||||
OVERLOADABLE int3 select (int3 param0, int3 param1, uint3 param2);
|
||||
OVERLOADABLE int4 select (int4 param0, int4 param1, uint4 param2);
|
||||
OVERLOADABLE int8 select (int8 param0, int8 param1, uint8 param2);
|
||||
OVERLOADABLE int16 select (int16 param0, int16 param1, uint16 param2);
|
||||
OVERLOADABLE long2 select (long2 param0, long2 param1, ulong2 param2);
|
||||
OVERLOADABLE long3 select (long3 param0, long3 param1, ulong3 param2);
|
||||
OVERLOADABLE long4 select (long4 param0, long4 param1, ulong4 param2);
|
||||
OVERLOADABLE long8 select (long8 param0, long8 param1, ulong8 param2);
|
||||
OVERLOADABLE long16 select (long16 param0, long16 param1, ulong16 param2);
|
||||
OVERLOADABLE uchar2 select (uchar2 param0, uchar2 param1, uchar2 param2);
|
||||
OVERLOADABLE uchar3 select (uchar3 param0, uchar3 param1, uchar3 param2);
|
||||
OVERLOADABLE uchar4 select (uchar4 param0, uchar4 param1, uchar4 param2);
|
||||
OVERLOADABLE uchar8 select (uchar8 param0, uchar8 param1, uchar8 param2);
|
||||
OVERLOADABLE uchar16 select (uchar16 param0, uchar16 param1, uchar16 param2);
|
||||
OVERLOADABLE ushort2 select (ushort2 param0, ushort2 param1, ushort2 param2);
|
||||
OVERLOADABLE ushort3 select (ushort3 param0, ushort3 param1, ushort3 param2);
|
||||
OVERLOADABLE ushort4 select (ushort4 param0, ushort4 param1, ushort4 param2);
|
||||
OVERLOADABLE ushort8 select (ushort8 param0, ushort8 param1, ushort8 param2);
|
||||
OVERLOADABLE ushort16 select (ushort16 param0, ushort16 param1, ushort16 param2);
|
||||
OVERLOADABLE uint2 select (uint2 param0, uint2 param1, uint2 param2);
|
||||
OVERLOADABLE uint3 select (uint3 param0, uint3 param1, uint3 param2);
|
||||
OVERLOADABLE uint4 select (uint4 param0, uint4 param1, uint4 param2);
|
||||
OVERLOADABLE uint8 select (uint8 param0, uint8 param1, uint8 param2);
|
||||
OVERLOADABLE uint16 select (uint16 param0, uint16 param1, uint16 param2);
|
||||
OVERLOADABLE ulong2 select (ulong2 param0, ulong2 param1, ulong2 param2);
|
||||
OVERLOADABLE ulong3 select (ulong3 param0, ulong3 param1, ulong3 param2);
|
||||
OVERLOADABLE ulong4 select (ulong4 param0, ulong4 param1, ulong4 param2);
|
||||
OVERLOADABLE ulong8 select (ulong8 param0, ulong8 param1, ulong8 param2);
|
||||
OVERLOADABLE ulong16 select (ulong16 param0, ulong16 param1, ulong16 param2);
|
||||
OVERLOADABLE float2 select (float2 param0, float2 param1, uint2 param2);
|
||||
OVERLOADABLE float3 select (float3 param0, float3 param1, uint3 param2);
|
||||
OVERLOADABLE float4 select (float4 param0, float4 param1, uint4 param2);
|
||||
OVERLOADABLE float8 select (float8 param0, float8 param1, uint8 param2);
|
||||
OVERLOADABLE float16 select (float16 param0, float16 param1, uint16 param2);
|
||||
OVERLOADABLE double2 select (double2 param0, double2 param1, ulong2 param2);
|
||||
OVERLOADABLE double3 select (double3 param0, double3 param1, ulong3 param2);
|
||||
OVERLOADABLE double4 select (double4 param0, double4 param1, ulong4 param2);
|
||||
OVERLOADABLE double8 select (double8 param0, double8 param1, ulong8 param2);
|
||||
OVERLOADABLE double16 select (double16 param0, double16 param1, ulong16 param2);
|
||||
OVERLOADABLE half2 select (half2 param0, half2 param1, ushort2 param2);
|
||||
OVERLOADABLE half3 select (half3 param0, half3 param1, ushort3 param2);
|
||||
OVERLOADABLE half4 select (half4 param0, half4 param1, ushort4 param2);
|
||||
OVERLOADABLE half8 select (half8 param0, half8 param1, ushort8 param2);
|
||||
OVERLOADABLE half16 select (half16 param0, half16 param1, ushort16 param2);
|
||||
|
||||
#endif
|
||||
@@ -1,386 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2015 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_SIMD_H__
|
||||
#define __OCL_SIMD_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// SIMD level function
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
int sub_group_any(int);
|
||||
int sub_group_all(int);
|
||||
|
||||
uint get_simd_size(void);
|
||||
|
||||
uint get_sub_group_size(void);
|
||||
uint get_max_sub_group_size(void);
|
||||
uint get_num_sub_groups(void);
|
||||
uint get_sub_group_id(void);
|
||||
uint get_sub_group_local_id(void);
|
||||
|
||||
/* broadcast */
|
||||
OVERLOADABLE int sub_group_broadcast(int a,uint local_id);
|
||||
OVERLOADABLE uint sub_group_broadcast(uint a, uint local_id);
|
||||
OVERLOADABLE long sub_group_broadcast(long a, uint local_id);
|
||||
OVERLOADABLE ulong sub_group_broadcast(ulong a, uint local_id);
|
||||
OVERLOADABLE half sub_group_broadcast(half a, uint local_id);
|
||||
OVERLOADABLE float sub_group_broadcast(float a, uint local_id);
|
||||
OVERLOADABLE double sub_group_broadcast(double a, uint local_id);
|
||||
OVERLOADABLE short sub_group_broadcast(short a,uint local_id);
|
||||
OVERLOADABLE ushort sub_group_broadcast(ushort a, uint local_id);
|
||||
|
||||
OVERLOADABLE short intel_sub_group_broadcast(short a, uint local_id);
|
||||
OVERLOADABLE ushort intel_sub_group_broadcast(ushort a, uint local_id);
|
||||
/* reduce add */
|
||||
OVERLOADABLE int sub_group_reduce_add(int x);
|
||||
OVERLOADABLE uint sub_group_reduce_add(uint x);
|
||||
OVERLOADABLE long sub_group_reduce_add(long x);
|
||||
OVERLOADABLE ulong sub_group_reduce_add(ulong x);
|
||||
OVERLOADABLE half sub_group_reduce_add(half x);
|
||||
OVERLOADABLE float sub_group_reduce_add(float x);
|
||||
OVERLOADABLE double sub_group_reduce_add(double x);
|
||||
OVERLOADABLE short sub_group_reduce_add(short x);
|
||||
OVERLOADABLE ushort sub_group_reduce_add(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_reduce_add(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_reduce_add(ushort x);
|
||||
|
||||
/* reduce min */
|
||||
OVERLOADABLE int sub_group_reduce_min(int x);
|
||||
OVERLOADABLE uint sub_group_reduce_min(uint x);
|
||||
OVERLOADABLE long sub_group_reduce_min(long x);
|
||||
OVERLOADABLE ulong sub_group_reduce_min(ulong x);
|
||||
OVERLOADABLE half sub_group_reduce_min(half x);
|
||||
OVERLOADABLE float sub_group_reduce_min(float x);
|
||||
OVERLOADABLE double sub_group_reduce_min(double x);
|
||||
OVERLOADABLE short sub_group_reduce_min(short x);
|
||||
OVERLOADABLE ushort sub_group_reduce_min(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_reduce_min(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_reduce_min(ushort x);
|
||||
|
||||
/* reduce max */
|
||||
OVERLOADABLE int sub_group_reduce_max(int x);
|
||||
OVERLOADABLE uint sub_group_reduce_max(uint x);
|
||||
OVERLOADABLE long sub_group_reduce_max(long x);
|
||||
OVERLOADABLE ulong sub_group_reduce_max(ulong x);
|
||||
OVERLOADABLE half sub_group_reduce_max(half x);
|
||||
OVERLOADABLE float sub_group_reduce_max(float x);
|
||||
OVERLOADABLE double sub_group_reduce_max(double x);
|
||||
OVERLOADABLE short sub_group_reduce_max(short x);
|
||||
OVERLOADABLE ushort sub_group_reduce_max(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_reduce_max(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_reduce_max(ushort x);
|
||||
|
||||
/* scan_inclusive add */
|
||||
OVERLOADABLE int sub_group_scan_inclusive_add(int x);
|
||||
OVERLOADABLE uint sub_group_scan_inclusive_add(uint x);
|
||||
OVERLOADABLE long sub_group_scan_inclusive_add(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_inclusive_add(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_inclusive_add(half x);
|
||||
OVERLOADABLE float sub_group_scan_inclusive_add(float x);
|
||||
OVERLOADABLE double sub_group_scan_inclusive_add(double x);
|
||||
OVERLOADABLE short sub_group_scan_inclusive_add(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_inclusive_add(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_scan_inclusive_add(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_scan_inclusive_add(ushort x);
|
||||
|
||||
/* scan_inclusive min */
|
||||
OVERLOADABLE int sub_group_scan_inclusive_min(int x);
|
||||
OVERLOADABLE uint sub_group_scan_inclusive_min(uint x);
|
||||
OVERLOADABLE long sub_group_scan_inclusive_min(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_inclusive_min(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_inclusive_min(half x);
|
||||
OVERLOADABLE float sub_group_scan_inclusive_min(float x);
|
||||
OVERLOADABLE double sub_group_scan_inclusive_min(double x);
|
||||
OVERLOADABLE short sub_group_scan_inclusive_min(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_inclusive_min(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_scan_inclusive_min(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_scan_inclusive_min(ushort x);
|
||||
|
||||
/* scan_inclusive max */
|
||||
OVERLOADABLE int sub_group_scan_inclusive_max(int x);
|
||||
OVERLOADABLE uint sub_group_scan_inclusive_max(uint x);
|
||||
OVERLOADABLE long sub_group_scan_inclusive_max(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_inclusive_max(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_inclusive_max(half x);
|
||||
OVERLOADABLE float sub_group_scan_inclusive_max(float x);
|
||||
OVERLOADABLE double sub_group_scan_inclusive_max(double x);
|
||||
OVERLOADABLE short sub_group_scan_inclusive_max(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_inclusive_max(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_scan_inclusive_max(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_scan_inclusive_max(ushort x);
|
||||
|
||||
/* scan_exclusive add */
|
||||
OVERLOADABLE int sub_group_scan_exclusive_add(int x);
|
||||
OVERLOADABLE uint sub_group_scan_exclusive_add(uint x);
|
||||
OVERLOADABLE long sub_group_scan_exclusive_add(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_exclusive_add(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_exclusive_add(half x);
|
||||
OVERLOADABLE float sub_group_scan_exclusive_add(float x);
|
||||
OVERLOADABLE double sub_group_scan_exclusive_add(double x);
|
||||
OVERLOADABLE short sub_group_scan_exclusive_add(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_exclusive_add(ushort x);
|
||||
OVERLOADABLE short intel_sub_group_scan_exclusive_add(short x);
|
||||
OVERLOADABLE ushort intel_sub_group_scan_exclusive_add(ushort x);
|
||||
|
||||
/* scan_exclusive min */
|
||||
OVERLOADABLE int sub_group_scan_exclusive_min(int x);
|
||||
OVERLOADABLE uint sub_group_scan_exclusive_min(uint x);
|
||||
OVERLOADABLE long sub_group_scan_exclusive_min(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_exclusive_min(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_exclusive_min(half x);
|
||||
OVERLOADABLE float sub_group_scan_exclusive_min(float x);
|
||||
OVERLOADABLE double sub_group_scan_exclusive_min(double x);
|
||||
OVERLOADABLE short sub_group_scan_exclusive_min(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_exclusive_min(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_scan_exclusive_min(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_scan_exclusive_min(ushort x);
|
||||
|
||||
/* scan_exclusive max */
|
||||
OVERLOADABLE int sub_group_scan_exclusive_max(int x);
|
||||
OVERLOADABLE uint sub_group_scan_exclusive_max(uint x);
|
||||
OVERLOADABLE long sub_group_scan_exclusive_max(long x);
|
||||
OVERLOADABLE ulong sub_group_scan_exclusive_max(ulong x);
|
||||
OVERLOADABLE half sub_group_scan_exclusive_max(half x);
|
||||
OVERLOADABLE float sub_group_scan_exclusive_max(float x);
|
||||
OVERLOADABLE double sub_group_scan_exclusive_max(double x);
|
||||
OVERLOADABLE short sub_group_scan_exclusive_max(short x);
|
||||
OVERLOADABLE ushort sub_group_scan_exclusive_max(ushort x);
|
||||
OVERLOADABLE short intel_sug_group_scan_exclusive_max(short x);
|
||||
OVERLOADABLE ushort intel_sug_group_scan_exclusive_max(ushort x);
|
||||
|
||||
/* shuffle */
|
||||
OVERLOADABLE half intel_sub_group_shuffle(half x, uint c);
|
||||
OVERLOADABLE float intel_sub_group_shuffle(float x, uint c);
|
||||
OVERLOADABLE int intel_sub_group_shuffle(int x, uint c);
|
||||
OVERLOADABLE uint intel_sub_group_shuffle(uint x, uint c);
|
||||
OVERLOADABLE short intel_sub_group_shuffle(short x, uint c);
|
||||
OVERLOADABLE ushort intel_sub_group_shuffle(ushort x, uint c);
|
||||
|
||||
OVERLOADABLE float intel_sub_group_shuffle_down(float x, float y, uint c);
|
||||
OVERLOADABLE int intel_sub_group_shuffle_down(int x, int y, uint c);
|
||||
OVERLOADABLE uint intel_sub_group_shuffle_down(uint x, uint y, uint c);
|
||||
OVERLOADABLE short intel_sub_group_shuffle_down(short x, short y, uint c);
|
||||
OVERLOADABLE ushort intel_sub_group_shuffle_down(ushort x, ushort y, uint c);
|
||||
|
||||
OVERLOADABLE float intel_sub_group_shuffle_up(float x, float y, uint c);
|
||||
OVERLOADABLE int intel_sub_group_shuffle_up(int x, int y, uint c);
|
||||
OVERLOADABLE uint intel_sub_group_shuffle_up(uint x, uint y, uint c);
|
||||
OVERLOADABLE short intel_sub_group_shuffle_up(short x, short y, uint c);
|
||||
OVERLOADABLE ushort intel_sub_group_shuffle_up(ushort x, ushort y, uint c);
|
||||
|
||||
OVERLOADABLE float intel_sub_group_shuffle_xor(float x, uint c);
|
||||
OVERLOADABLE int intel_sub_group_shuffle_xor(int x, uint c);
|
||||
OVERLOADABLE uint intel_sub_group_shuffle_xor(uint x, uint c);
|
||||
OVERLOADABLE short intel_sub_group_shuffle_xor(short x, uint c);
|
||||
OVERLOADABLE ushort intel_sub_group_shuffle_xor(ushort x, uint c);
|
||||
|
||||
/* blocak read/write */
|
||||
OVERLOADABLE uint intel_sub_group_block_read(const global uint* p);
|
||||
OVERLOADABLE uint2 intel_sub_group_block_read2(const global uint* p);
|
||||
OVERLOADABLE uint4 intel_sub_group_block_read4(const global uint* p);
|
||||
OVERLOADABLE uint8 intel_sub_group_block_read8(const global uint* p);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write(__global uint* p, uint data);
|
||||
OVERLOADABLE void intel_sub_group_block_write2(__global uint* p, uint2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write4(__global uint* p, uint4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write8(__global uint* p, uint8 data);
|
||||
|
||||
OVERLOADABLE uint intel_sub_group_block_read(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint2 intel_sub_group_block_read2(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint4 intel_sub_group_block_read4(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint8 intel_sub_group_block_read8(image2d_t image, int2 byte_coord);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write(image2d_t image, int2 byte_coord, uint data);
|
||||
OVERLOADABLE void intel_sub_group_block_write2(image2d_t image, int2 byte_coord, uint2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write4(image2d_t image, int2 byte_coord, uint4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write8(image2d_t image, int2 byte_coord, uint8 data);
|
||||
|
||||
OVERLOADABLE uint intel_sub_group_block_read_ui(const global uint* p);
|
||||
OVERLOADABLE uint2 intel_sub_group_block_read_ui2(const global uint* p);
|
||||
OVERLOADABLE uint4 intel_sub_group_block_read_ui4(const global uint* p);
|
||||
OVERLOADABLE uint8 intel_sub_group_block_read_ui8(const global uint* p);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui(__global uint* p, uint data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui2(__global uint* p, uint2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui4(__global uint* p, uint4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui8(__global uint* p, uint8 data);
|
||||
|
||||
OVERLOADABLE uint intel_sub_group_block_read_ui(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint2 intel_sub_group_block_read_ui2(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint4 intel_sub_group_block_read_ui4(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE uint8 intel_sub_group_block_read_ui8(image2d_t image, int2 byte_coord);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui(image2d_t image, int2 byte_coord, uint data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui2(image2d_t image, int2 byte_coord, uint2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui4(image2d_t image, int2 byte_coord, uint4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_ui8(image2d_t image, int2 byte_coord, uint8 data);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_ui(int2 src_byte_offset, int width, int height, uint texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_ui2(int2 src_byte_offset, int width, int height, uint2 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_ui4(int2 src_byte_offset, int width, int height, uint4 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_ui8(int2 src_byte_offset, int width, int height, uint8 texels, image2d_t image);
|
||||
|
||||
OVERLOADABLE ushort intel_sub_group_block_read_us(const global ushort* p);
|
||||
OVERLOADABLE ushort2 intel_sub_group_block_read_us2(const global ushort* p);
|
||||
OVERLOADABLE ushort4 intel_sub_group_block_read_us4(const global ushort* p);
|
||||
OVERLOADABLE ushort8 intel_sub_group_block_read_us8(const global ushort* p);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write_us(__global ushort* p, ushort data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us2(__global ushort* p, ushort2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us4(__global ushort* p, ushort4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us8(__global ushort* p, ushort8 data);
|
||||
|
||||
OVERLOADABLE ushort intel_sub_group_block_read_us(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE ushort2 intel_sub_group_block_read_us2(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE ushort4 intel_sub_group_block_read_us4(image2d_t image, int2 byte_coord);
|
||||
OVERLOADABLE ushort8 intel_sub_group_block_read_us8(image2d_t image, int2 byte_coord);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_block_write_us(image2d_t image, int2 byte_coord, ushort data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us2(image2d_t image, int2 byte_coord, ushort2 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us4(image2d_t image, int2 byte_coord, ushort4 data);
|
||||
OVERLOADABLE void intel_sub_group_block_write_us8(image2d_t image, int2 byte_coord, ushort8 data);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_uc(int2 src_byte_offset, int width, int height, uchar texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_uc2(int2 src_byte_offset, int width, int height, uchar2 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_uc4(int2 src_byte_offset, int width, int height, uchar4 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_uc8(int2 src_byte_offset, int width, int height, uchar8 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_uc16(int2 src_byte_offset, int width, int height, uchar16 texels, image2d_t image);
|
||||
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_us(int2 src_byte_offset, int width, int height, ushort texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_us2(int2 src_byte_offset, int width, int height, ushort2 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_us4(int2 src_byte_offset, int width, int height, ushort4 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_us8(int2 src_byte_offset, int width, int height, ushort8 texels, image2d_t image);
|
||||
OVERLOADABLE void intel_sub_group_media_block_write_us16(int2 src_byte_offset, int width, int height, ushort16 texels, image2d_t image);
|
||||
|
||||
OVERLOADABLE uchar intel_sub_group_media_block_read_uc(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uchar2 intel_sub_group_media_block_read_uc2(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uchar4 intel_sub_group_media_block_read_uc4(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uchar8 intel_sub_group_media_block_read_uc8(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uchar16 intel_sub_group_media_block_read_uc16(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
|
||||
OVERLOADABLE ushort intel_sub_group_media_block_read_us(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE ushort2 intel_sub_group_media_block_read_us2(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE ushort4 intel_sub_group_media_block_read_us4(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE ushort8 intel_sub_group_media_block_read_us8(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE ushort16 intel_sub_group_media_block_read_us16(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
|
||||
OVERLOADABLE uint intel_sub_group_media_block_read_ui(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uint2 intel_sub_group_media_block_read_ui2(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uint4 intel_sub_group_media_block_read_ui4(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
OVERLOADABLE uint8 intel_sub_group_media_block_read_ui8(int2 src_byte_offset, int width, int height, read_only image2d_t image);
|
||||
//Begin from this part is autogenerated.
|
||||
//Don't modify it manually.
|
||||
//simd level functions builtin functions
|
||||
//floatn intel_sub_group_shuffle(floatn x, uint c)
|
||||
|
||||
OVERLOADABLE float2 intel_sub_group_shuffle (float2 param0, uint param1);
|
||||
OVERLOADABLE float3 intel_sub_group_shuffle (float3 param0, uint param1);
|
||||
OVERLOADABLE float4 intel_sub_group_shuffle (float4 param0, uint param1);
|
||||
OVERLOADABLE float8 intel_sub_group_shuffle (float8 param0, uint param1);
|
||||
OVERLOADABLE float16 intel_sub_group_shuffle (float16 param0, uint param1);
|
||||
|
||||
//intn intel_sub_group_shuffle(intn x, uint c)
|
||||
|
||||
OVERLOADABLE int2 intel_sub_group_shuffle (int2 param0, uint param1);
|
||||
OVERLOADABLE int3 intel_sub_group_shuffle (int3 param0, uint param1);
|
||||
OVERLOADABLE int4 intel_sub_group_shuffle (int4 param0, uint param1);
|
||||
OVERLOADABLE int8 intel_sub_group_shuffle (int8 param0, uint param1);
|
||||
OVERLOADABLE int16 intel_sub_group_shuffle (int16 param0, uint param1);
|
||||
|
||||
//uintn intel_sub_group_shuffle(uintn x, uint c)
|
||||
|
||||
OVERLOADABLE uint2 intel_sub_group_shuffle (uint2 param0, uint param1);
|
||||
OVERLOADABLE uint3 intel_sub_group_shuffle (uint3 param0, uint param1);
|
||||
OVERLOADABLE uint4 intel_sub_group_shuffle (uint4 param0, uint param1);
|
||||
OVERLOADABLE uint8 intel_sub_group_shuffle (uint8 param0, uint param1);
|
||||
OVERLOADABLE uint16 intel_sub_group_shuffle (uint16 param0, uint param1);
|
||||
|
||||
//floatn intel_sub_group_shuffle_down(floatn x, floatn y, uint c)
|
||||
|
||||
OVERLOADABLE float2 intel_sub_group_shuffle_down (float2 param0, float2 param1, uint param2);
|
||||
OVERLOADABLE float3 intel_sub_group_shuffle_down (float3 param0, float3 param1, uint param2);
|
||||
OVERLOADABLE float4 intel_sub_group_shuffle_down (float4 param0, float4 param1, uint param2);
|
||||
OVERLOADABLE float8 intel_sub_group_shuffle_down (float8 param0, float8 param1, uint param2);
|
||||
OVERLOADABLE float16 intel_sub_group_shuffle_down (float16 param0, float16 param1, uint param2);
|
||||
|
||||
//intn intel_sub_group_shuffle_down(intn x, intn y, uint c)
|
||||
|
||||
OVERLOADABLE int2 intel_sub_group_shuffle_down (int2 param0, int2 param1, uint param2);
|
||||
OVERLOADABLE int3 intel_sub_group_shuffle_down (int3 param0, int3 param1, uint param2);
|
||||
OVERLOADABLE int4 intel_sub_group_shuffle_down (int4 param0, int4 param1, uint param2);
|
||||
OVERLOADABLE int8 intel_sub_group_shuffle_down (int8 param0, int8 param1, uint param2);
|
||||
OVERLOADABLE int16 intel_sub_group_shuffle_down (int16 param0, int16 param1, uint param2);
|
||||
|
||||
//uintn intel_sub_group_shuffle_down(uintn x, uintn y, uint c)
|
||||
|
||||
OVERLOADABLE uint2 intel_sub_group_shuffle_down (uint2 param0, uint2 param1, uint param2);
|
||||
OVERLOADABLE uint3 intel_sub_group_shuffle_down (uint3 param0, uint3 param1, uint param2);
|
||||
OVERLOADABLE uint4 intel_sub_group_shuffle_down (uint4 param0, uint4 param1, uint param2);
|
||||
OVERLOADABLE uint8 intel_sub_group_shuffle_down (uint8 param0, uint8 param1, uint param2);
|
||||
OVERLOADABLE uint16 intel_sub_group_shuffle_down (uint16 param0, uint16 param1, uint param2);
|
||||
|
||||
//floatn intel_sub_group_shuffle_up(floatn x, floatn y, uint c)
|
||||
|
||||
OVERLOADABLE float2 intel_sub_group_shuffle_up (float2 param0, float2 param1, uint param2);
|
||||
OVERLOADABLE float3 intel_sub_group_shuffle_up (float3 param0, float3 param1, uint param2);
|
||||
OVERLOADABLE float4 intel_sub_group_shuffle_up (float4 param0, float4 param1, uint param2);
|
||||
OVERLOADABLE float8 intel_sub_group_shuffle_up (float8 param0, float8 param1, uint param2);
|
||||
OVERLOADABLE float16 intel_sub_group_shuffle_up (float16 param0, float16 param1, uint param2);
|
||||
|
||||
//intn intel_sub_group_shuffle_up(intn x, intn y, uint c)
|
||||
|
||||
OVERLOADABLE int2 intel_sub_group_shuffle_up (int2 param0, int2 param1, uint param2);
|
||||
OVERLOADABLE int3 intel_sub_group_shuffle_up (int3 param0, int3 param1, uint param2);
|
||||
OVERLOADABLE int4 intel_sub_group_shuffle_up (int4 param0, int4 param1, uint param2);
|
||||
OVERLOADABLE int8 intel_sub_group_shuffle_up (int8 param0, int8 param1, uint param2);
|
||||
OVERLOADABLE int16 intel_sub_group_shuffle_up (int16 param0, int16 param1, uint param2);
|
||||
|
||||
//uintn intel_sub_group_shuffle_up(uintn x, uintn y, uint c)
|
||||
|
||||
OVERLOADABLE uint2 intel_sub_group_shuffle_up (uint2 param0, uint2 param1, uint param2);
|
||||
OVERLOADABLE uint3 intel_sub_group_shuffle_up (uint3 param0, uint3 param1, uint param2);
|
||||
OVERLOADABLE uint4 intel_sub_group_shuffle_up (uint4 param0, uint4 param1, uint param2);
|
||||
OVERLOADABLE uint8 intel_sub_group_shuffle_up (uint8 param0, uint8 param1, uint param2);
|
||||
OVERLOADABLE uint16 intel_sub_group_shuffle_up (uint16 param0, uint16 param1, uint param2);
|
||||
|
||||
//floatn intel_sub_group_shuffle_xor(floatn x, uint c)
|
||||
|
||||
OVERLOADABLE float2 intel_sub_group_shuffle_xor (float2 param0, uint param1);
|
||||
OVERLOADABLE float3 intel_sub_group_shuffle_xor (float3 param0, uint param1);
|
||||
OVERLOADABLE float4 intel_sub_group_shuffle_xor (float4 param0, uint param1);
|
||||
OVERLOADABLE float8 intel_sub_group_shuffle_xor (float8 param0, uint param1);
|
||||
OVERLOADABLE float16 intel_sub_group_shuffle_xor (float16 param0, uint param1);
|
||||
|
||||
//intn intel_sub_group_shuffle_xor(intn x, uint c)
|
||||
|
||||
OVERLOADABLE int2 intel_sub_group_shuffle_xor (int2 param0, uint param1);
|
||||
OVERLOADABLE int3 intel_sub_group_shuffle_xor (int3 param0, uint param1);
|
||||
OVERLOADABLE int4 intel_sub_group_shuffle_xor (int4 param0, uint param1);
|
||||
OVERLOADABLE int8 intel_sub_group_shuffle_xor (int8 param0, uint param1);
|
||||
OVERLOADABLE int16 intel_sub_group_shuffle_xor (int16 param0, uint param1);
|
||||
|
||||
//uintn intel_sub_group_shuffle_xor(uintn x, uint c)
|
||||
|
||||
OVERLOADABLE uint2 intel_sub_group_shuffle_xor (uint2 param0, uint param1);
|
||||
OVERLOADABLE uint3 intel_sub_group_shuffle_xor (uint3 param0, uint param1);
|
||||
OVERLOADABLE uint4 intel_sub_group_shuffle_xor (uint4 param0, uint param1);
|
||||
OVERLOADABLE uint8 intel_sub_group_shuffle_xor (uint8 param0, uint param1);
|
||||
OVERLOADABLE uint16 intel_sub_group_shuffle_xor (uint16 param0, uint param1);
|
||||
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_SYNC_H__
|
||||
#define __OCL_SYNC_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Synchronization functions
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
OVERLOADABLE void barrier(cl_mem_fence_flags flags);
|
||||
OVERLOADABLE void debugwait(void);
|
||||
OVERLOADABLE void mem_fence(cl_mem_fence_flags flags);
|
||||
OVERLOADABLE void read_mem_fence(cl_mem_fence_flags flags);
|
||||
OVERLOADABLE void write_mem_fence(cl_mem_fence_flags flags);
|
||||
#define work_group_barrier barrier
|
||||
cl_mem_fence_flags get_fence(void *ptr);
|
||||
#endif /* __OCL_SYNC_H__ */
|
||||
@@ -1,128 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_TYPES_H__
|
||||
#define __OCL_TYPES_H__
|
||||
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
#define DISABLE_ATOMIC_INT64
|
||||
#ifndef DISABLE_ATOMIC_INT64
|
||||
#pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
|
||||
#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
|
||||
#endif
|
||||
#include "ocl_defines.h"
|
||||
|
||||
#define NULL 0
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL Common Defines
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define INLINE inline __attribute__((always_inline))
|
||||
#define OVERLOADABLE __attribute__((overloadable))
|
||||
#define PURE __attribute__((pure))
|
||||
#define CONST __attribute__((const))
|
||||
#define INLINE_OVERLOADABLE inline __attribute__((overloadable,always_inline))
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL built-in scalar data types
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
typedef __typeof__(sizeof(int)) size_t;
|
||||
typedef __typeof__((int *)0-(int *)0) ptrdiff_t;
|
||||
#define __int_t_type(a,b,c) a##b##c
|
||||
#define __int_type(type,n) __int_t_type(type,n,_TYPE__)
|
||||
typedef __int_type(__INT,__INTPTR_WIDTH__) intptr_t;
|
||||
typedef __int_type(__UINT,__INTPTR_WIDTH__) uintptr_t;
|
||||
#undef __int_type
|
||||
#undef __int_t_type
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL address space
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// These are built-ins in LLVM 3.3.
|
||||
#if 100*__clang_major__ + __clang_minor__ <= 302
|
||||
#define __private __attribute__((address_space(0)))
|
||||
#define __global __attribute__((address_space(1)))
|
||||
#define __constant __attribute__((address_space(2)))
|
||||
#define __local __attribute__((address_space(3)))
|
||||
#define global __global
|
||||
#define local __local
|
||||
#define constant __constant
|
||||
#define private __private
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL built-in vector data types
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#define DEF(type) typedef type type##2 __attribute__((ext_vector_type(2)));\
|
||||
typedef type type##3 __attribute__((ext_vector_type(3)));\
|
||||
typedef type type##4 __attribute__((ext_vector_type(4)));\
|
||||
typedef type type##8 __attribute__((ext_vector_type(8)));\
|
||||
typedef type type##16 __attribute__((ext_vector_type(16)));
|
||||
DEF(char);
|
||||
DEF(uchar);
|
||||
DEF(short);
|
||||
DEF(ushort);
|
||||
DEF(int);
|
||||
DEF(uint);
|
||||
DEF(long);
|
||||
DEF(ulong);
|
||||
DEF(float);
|
||||
DEF(double);
|
||||
DEF(half);
|
||||
#undef DEF
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL atomic related types
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//atomic flags
|
||||
#define CLK_LOCAL_MEM_FENCE (1 << 0)
|
||||
#define CLK_GLOBAL_MEM_FENCE (1 << 1)
|
||||
#define CLK_IMAGE_MEM_FENCE (1 << 2)
|
||||
|
||||
typedef uint cl_mem_fence_flags;
|
||||
|
||||
//memory order
|
||||
typedef enum {
|
||||
memory_order_relaxed,
|
||||
memory_order_acquire,
|
||||
memory_order_release,
|
||||
memory_order_acq_rel,
|
||||
memory_order_seq_cst
|
||||
} memory_order;
|
||||
|
||||
//memory scope
|
||||
typedef enum {
|
||||
memory_scope_work_item,
|
||||
memory_scope_work_group,
|
||||
memory_scope_device,
|
||||
memory_scope_all_svm_devices,
|
||||
memory_scope_sub_group,
|
||||
} memory_scope;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// OpenCL built-in event types
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// FIXME:
|
||||
// This is a transitional hack to bypass the LLVM 3.3 built-in types.
|
||||
// See the Khronos SPIR specification for handling of these types.
|
||||
|
||||
#endif /* __OCL_TYPES_H__ */
|
||||
@@ -1,160 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_VLOAD_H__
|
||||
#define __OCL_VLOAD_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Vector loads and stores
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// These loads and stores will use untyped reads and writes, so we can just
|
||||
// cast to vector loads / stores. Not C99 compliant BTW due to aliasing issue.
|
||||
// Well we do not care, we do not activate TBAA in the compiler
|
||||
#define DECL_UNTYPED_RW_SPACE_N(TYPE, DIM, SPACE) \
|
||||
OVERLOADABLE TYPE##DIM vload##DIM(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore##DIM(TYPE##DIM v, size_t offset, SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RD_SPACE_N(TYPE, DIM, SPACE) \
|
||||
OVERLOADABLE TYPE##DIM vload##DIM(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_V3_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE void vstore3(TYPE##3 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RDV3_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RW_ALL_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 2, SPACE) \
|
||||
DECL_UNTYPED_V3_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 4, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 8, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 16, SPACE)
|
||||
|
||||
#define DECL_UNTYPED_RD_ALL_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 2, SPACE) \
|
||||
DECL_UNTYPED_RDV3_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 4, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 8, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 16, SPACE)
|
||||
|
||||
#define DECL_UNTYPED_RW_ALL(TYPE) \
|
||||
DECL_UNTYPED_RW_ALL_SPACE(TYPE, __global) \
|
||||
DECL_UNTYPED_RW_ALL_SPACE(TYPE, __local) \
|
||||
DECL_UNTYPED_RD_ALL_SPACE(TYPE, __constant) \
|
||||
DECL_UNTYPED_RW_ALL_SPACE(TYPE, __private)
|
||||
|
||||
#define DECL_BYTE_RD_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE TYPE##2 vload2(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##4 vload4(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##8 vload8(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##16 vload16(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_BYTE_WR_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE void vstore2(TYPE##2 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore3(TYPE##3 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore4(TYPE##4 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore8(TYPE##8 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore16(TYPE##16 v, size_t offset, SPACE TYPE *p);
|
||||
|
||||
#define DECL_BYTE_RW_ALL(TYPE) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __global) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __local) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __private) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __constant) \
|
||||
DECL_BYTE_WR_SPACE(TYPE, __global) \
|
||||
DECL_BYTE_WR_SPACE(TYPE, __local) \
|
||||
DECL_BYTE_WR_SPACE(TYPE, __private)
|
||||
|
||||
DECL_BYTE_RW_ALL(char)
|
||||
DECL_BYTE_RW_ALL(uchar)
|
||||
DECL_BYTE_RW_ALL(short)
|
||||
DECL_BYTE_RW_ALL(ushort)
|
||||
DECL_BYTE_RW_ALL(half)
|
||||
DECL_UNTYPED_RW_ALL(int)
|
||||
DECL_UNTYPED_RW_ALL(uint)
|
||||
DECL_UNTYPED_RW_ALL(long)
|
||||
DECL_UNTYPED_RW_ALL(ulong)
|
||||
DECL_UNTYPED_RW_ALL(float)
|
||||
DECL_UNTYPED_RW_ALL(double)
|
||||
|
||||
#undef DECL_UNTYPED_RW_ALL
|
||||
#undef DECL_UNTYPED_RW_ALL_SPACE
|
||||
#undef DECL_UNTYPED_RD_ALL_SPACE
|
||||
#undef DECL_UNTYPED_RW_SPACE_N
|
||||
#undef DECL_UNTYPED_RD_SPACE_N
|
||||
#undef DECL_UNTYPED_V3_SPACE
|
||||
#undef DECL_UNTYPED_RDV3_SPACE
|
||||
#undef DECL_BYTE_RD_SPACE
|
||||
#undef DECL_BYTE_WR_SPACE
|
||||
#undef DECL_BYTE_RW_ALL
|
||||
|
||||
|
||||
#define DECL_HALF_LD_SPACE(SPACE) \
|
||||
OVERLOADABLE float vload_half(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float vloada_half(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float2 vload_half2(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float2 vloada_half2(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float3 vload_half3(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float3 vloada_half3(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float4 vload_half4(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float4 vloada_half4(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float8 vload_half8(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float8 vloada_half8(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float16 vload_half16(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float16 vloada_half16(size_t offset, const SPACE half *p); \
|
||||
|
||||
#define DECL_HALF_ST_SPACE_ROUND(SPACE, ROUND, FUNC) \
|
||||
OVERLOADABLE void vstore_half##ROUND(float data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half##ROUND(float data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half2##ROUND(float2 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half2##ROUND(float2 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half3##ROUND(float3 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half3##ROUND(float3 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half4##ROUND(float4 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half4##ROUND(float4 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half8##ROUND(float8 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half8##ROUND(float8 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half16##ROUND(float16 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half16##ROUND(float16 data, size_t offset, SPACE half *p);
|
||||
|
||||
#define DECL_HALF_ST_SPACE(SPACE) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, , dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rte, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtz, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtp, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtn, dummy) \
|
||||
|
||||
DECL_HALF_LD_SPACE(__global)
|
||||
DECL_HALF_LD_SPACE(__local)
|
||||
DECL_HALF_LD_SPACE(__constant)
|
||||
DECL_HALF_LD_SPACE(__private)
|
||||
|
||||
DECL_HALF_ST_SPACE(__global)
|
||||
DECL_HALF_ST_SPACE(__local)
|
||||
DECL_HALF_ST_SPACE(__private)
|
||||
|
||||
//#undef DECL_UNTYPED_RW_ALL_SPACE
|
||||
#undef DECL_HALF_LD_SPACE
|
||||
#undef DECL_HALF_ST_SPACE
|
||||
#undef DECL_HALF_ST_SPACE_ROUND
|
||||
|
||||
#endif /* __OCL_VLOAD_H__ */
|
||||
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_VLOAD_20_H__
|
||||
#define __OCL_VLOAD_20_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Vector loads and stores
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// These loads and stores will use untyped reads and writes, so we can just
|
||||
// cast to vector loads / stores. Not C99 compliant BTW due to aliasing issue.
|
||||
// Well we do not care, we do not activate TBAA in the compiler
|
||||
#define DECL_UNTYPED_RW_SPACE_N(TYPE, DIM, SPACE) \
|
||||
OVERLOADABLE TYPE##DIM vload##DIM(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore##DIM(TYPE##DIM v, size_t offset, SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RD_SPACE_N(TYPE, DIM, SPACE) \
|
||||
OVERLOADABLE TYPE##DIM vload##DIM(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_V3_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE void vstore3(TYPE##3 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RDV3_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_UNTYPED_RW_ALL_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 2, SPACE) \
|
||||
DECL_UNTYPED_V3_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 4, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 8, SPACE) \
|
||||
DECL_UNTYPED_RW_SPACE_N(TYPE, 16, SPACE)
|
||||
|
||||
#define DECL_UNTYPED_RD_ALL_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 2, SPACE) \
|
||||
DECL_UNTYPED_RDV3_SPACE(TYPE, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 4, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 8, SPACE) \
|
||||
DECL_UNTYPED_RD_SPACE_N(TYPE, 16, SPACE)
|
||||
|
||||
#define DECL_UNTYPED_RW_ALL(TYPE) \
|
||||
DECL_UNTYPED_RD_ALL_SPACE(TYPE, __constant) \
|
||||
DECL_UNTYPED_RW_ALL_SPACE(TYPE, __generic)
|
||||
|
||||
#define DECL_BYTE_RD_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE TYPE##2 vload2(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##3 vload3(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##4 vload4(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##8 vload8(size_t offset, const SPACE TYPE *p); \
|
||||
OVERLOADABLE TYPE##16 vload16(size_t offset, const SPACE TYPE *p);
|
||||
|
||||
#define DECL_BYTE_WR_SPACE(TYPE, SPACE) \
|
||||
OVERLOADABLE void vstore2(TYPE##2 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore3(TYPE##3 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore4(TYPE##4 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore8(TYPE##8 v, size_t offset, SPACE TYPE *p); \
|
||||
OVERLOADABLE void vstore16(TYPE##16 v, size_t offset, SPACE TYPE *p);
|
||||
|
||||
#define DECL_BYTE_RW_ALL(TYPE) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __generic) \
|
||||
DECL_BYTE_WR_SPACE(TYPE, __generic) \
|
||||
DECL_BYTE_RD_SPACE(TYPE, __constant)
|
||||
|
||||
DECL_BYTE_RW_ALL(char)
|
||||
DECL_BYTE_RW_ALL(uchar)
|
||||
DECL_BYTE_RW_ALL(short)
|
||||
DECL_BYTE_RW_ALL(ushort)
|
||||
DECL_BYTE_RW_ALL(half)
|
||||
DECL_UNTYPED_RW_ALL(int)
|
||||
DECL_UNTYPED_RW_ALL(uint)
|
||||
DECL_UNTYPED_RW_ALL(long)
|
||||
DECL_UNTYPED_RW_ALL(ulong)
|
||||
DECL_UNTYPED_RW_ALL(float)
|
||||
DECL_UNTYPED_RW_ALL(double)
|
||||
|
||||
#undef DECL_UNTYPED_RW_ALL
|
||||
#undef DECL_UNTYPED_RW_ALL_SPACE
|
||||
#undef DECL_UNTYPED_RD_ALL_SPACE
|
||||
#undef DECL_UNTYPED_RW_SPACE_N
|
||||
#undef DECL_UNTYPED_RD_SPACE_N
|
||||
#undef DECL_UNTYPED_V3_SPACE
|
||||
#undef DECL_UNTYPED_RDV3_SPACE
|
||||
#undef DECL_BYTE_RD_SPACE
|
||||
#undef DECL_BYTE_WR_SPACE
|
||||
#undef DECL_BYTE_RW_ALL
|
||||
|
||||
|
||||
#define DECL_HALF_LD_SPACE(SPACE) \
|
||||
OVERLOADABLE float vload_half(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float vloada_half(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float2 vload_half2(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float2 vloada_half2(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float3 vload_half3(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float3 vloada_half3(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float4 vload_half4(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float4 vloada_half4(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float8 vload_half8(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float8 vloada_half8(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float16 vload_half16(size_t offset, const SPACE half *p); \
|
||||
OVERLOADABLE float16 vloada_half16(size_t offset, const SPACE half *p); \
|
||||
|
||||
#define DECL_HALF_ST_SPACE_ROUND(SPACE, ROUND, FUNC) \
|
||||
OVERLOADABLE void vstore_half##ROUND(float data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half##ROUND(float data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half2##ROUND(float2 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half2##ROUND(float2 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half3##ROUND(float3 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half3##ROUND(float3 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half4##ROUND(float4 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half4##ROUND(float4 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half8##ROUND(float8 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half8##ROUND(float8 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstore_half16##ROUND(float16 data, size_t offset, SPACE half *p); \
|
||||
OVERLOADABLE void vstorea_half16##ROUND(float16 data, size_t offset, SPACE half *p);
|
||||
|
||||
#define DECL_HALF_ST_SPACE(SPACE) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, , dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rte, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtz, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtp, dummy) \
|
||||
DECL_HALF_ST_SPACE_ROUND(SPACE, _rtn, dummy) \
|
||||
|
||||
DECL_HALF_LD_SPACE(__constant)
|
||||
DECL_HALF_LD_SPACE(__generic)
|
||||
|
||||
DECL_HALF_ST_SPACE(__generic)
|
||||
|
||||
//#undef DECL_UNTYPED_RW_ALL_SPACE
|
||||
#undef DECL_HALF_LD_SPACE
|
||||
#undef DECL_HALF_ST_SPACE
|
||||
#undef DECL_HALF_ST_SPACE_ROUND
|
||||
|
||||
#endif /* __OCL_VLOAD_20_H__ */
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_WORK_GROUP_H__
|
||||
#define __OCL_WORK_GROUP_H__
|
||||
#include "ocl_types.h"
|
||||
|
||||
int work_group_all(int predicate);
|
||||
int work_group_any(int predicate);
|
||||
|
||||
/* broadcast */
|
||||
OVERLOADABLE int work_group_broadcast(int a, size_t local_id);
|
||||
OVERLOADABLE uint work_group_broadcast(uint a, size_t local_id);
|
||||
OVERLOADABLE long work_group_broadcast(long a, size_t local_id);
|
||||
OVERLOADABLE ulong work_group_broadcast(ulong a, size_t local_id);
|
||||
OVERLOADABLE float work_group_broadcast(float a, size_t local_id);
|
||||
OVERLOADABLE double work_group_broadcast(double a, size_t local_id);
|
||||
|
||||
OVERLOADABLE int work_group_broadcast(int a, size_t local_id_x, size_t local_id_y);
|
||||
OVERLOADABLE uint work_group_broadcast(uint a, size_t local_id_x, size_t local_id_y);
|
||||
OVERLOADABLE long work_group_broadcast(long a, size_t local_id_x, size_t local_id_y);
|
||||
OVERLOADABLE ulong work_group_broadcast(ulong a, size_t local_id_x, size_t local_id_y);
|
||||
OVERLOADABLE float work_group_broadcast(float a, size_t local_id_x, size_t local_id_y);
|
||||
OVERLOADABLE double work_group_broadcast(double a, size_t local_id_x, size_t local_id_y);
|
||||
|
||||
OVERLOADABLE int work_group_broadcast(int a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
OVERLOADABLE uint work_group_broadcast(uint a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
OVERLOADABLE long work_group_broadcast(long a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
OVERLOADABLE ulong work_group_broadcast(ulong a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
OVERLOADABLE float work_group_broadcast(float a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
OVERLOADABLE double work_group_broadcast(double a, size_t local_id_x, size_t local_id_y, size_t local_id_z);
|
||||
|
||||
/* reduce add */
|
||||
OVERLOADABLE int work_group_reduce_add(int x);
|
||||
OVERLOADABLE uint work_group_reduce_add(uint x);
|
||||
OVERLOADABLE long work_group_reduce_add(long x);
|
||||
OVERLOADABLE ulong work_group_reduce_add(ulong x);
|
||||
OVERLOADABLE float work_group_reduce_add(float x);
|
||||
OVERLOADABLE double work_group_reduce_add(double x);
|
||||
|
||||
/* reduce min */
|
||||
OVERLOADABLE int work_group_reduce_min(int x);
|
||||
OVERLOADABLE uint work_group_reduce_min(uint x);
|
||||
OVERLOADABLE long work_group_reduce_min(long x);
|
||||
OVERLOADABLE ulong work_group_reduce_min(ulong x);
|
||||
OVERLOADABLE float work_group_reduce_min(float x);
|
||||
OVERLOADABLE double work_group_reduce_min(double x);
|
||||
|
||||
/* reduce max */
|
||||
OVERLOADABLE int work_group_reduce_max(int x);
|
||||
OVERLOADABLE uint work_group_reduce_max(uint x);
|
||||
OVERLOADABLE long work_group_reduce_max(long x);
|
||||
OVERLOADABLE ulong work_group_reduce_max(ulong x);
|
||||
OVERLOADABLE float work_group_reduce_max(float x);
|
||||
OVERLOADABLE double work_group_reduce_max(double x);
|
||||
|
||||
/* scan_inclusive add */
|
||||
OVERLOADABLE int work_group_scan_inclusive_add(int x);
|
||||
OVERLOADABLE uint work_group_scan_inclusive_add(uint x);
|
||||
OVERLOADABLE long work_group_scan_inclusive_add(long x);
|
||||
OVERLOADABLE ulong work_group_scan_inclusive_add(ulong x);
|
||||
OVERLOADABLE float work_group_scan_inclusive_add(float x);
|
||||
OVERLOADABLE double work_group_scan_inclusive_add(double x);
|
||||
|
||||
/* scan_inclusive min */
|
||||
OVERLOADABLE int work_group_scan_inclusive_min(int x);
|
||||
OVERLOADABLE uint work_group_scan_inclusive_min(uint x);
|
||||
OVERLOADABLE long work_group_scan_inclusive_min(long x);
|
||||
OVERLOADABLE ulong work_group_scan_inclusive_min(ulong x);
|
||||
OVERLOADABLE float work_group_scan_inclusive_min(float x);
|
||||
OVERLOADABLE double work_group_scan_inclusive_min(double x);
|
||||
|
||||
/* scan_inclusive max */
|
||||
OVERLOADABLE int work_group_scan_inclusive_max(int x);
|
||||
OVERLOADABLE uint work_group_scan_inclusive_max(uint x);
|
||||
OVERLOADABLE long work_group_scan_inclusive_max(long x);
|
||||
OVERLOADABLE ulong work_group_scan_inclusive_max(ulong x);
|
||||
OVERLOADABLE float work_group_scan_inclusive_max(float x);
|
||||
OVERLOADABLE double work_group_scan_inclusive_max(double x);
|
||||
|
||||
/* scan_exclusive add */
|
||||
OVERLOADABLE int work_group_scan_exclusive_add(int x);
|
||||
OVERLOADABLE uint work_group_scan_exclusive_add(uint x);
|
||||
OVERLOADABLE long work_group_scan_exclusive_add(long x);
|
||||
OVERLOADABLE ulong work_group_scan_exclusive_add(ulong x);
|
||||
OVERLOADABLE float work_group_scan_exclusive_add(float x);
|
||||
OVERLOADABLE double work_group_scan_exclusive_add(double x);
|
||||
|
||||
/* scan_exclusive min */
|
||||
OVERLOADABLE int work_group_scan_exclusive_min(int x);
|
||||
OVERLOADABLE uint work_group_scan_exclusive_min(uint x);
|
||||
OVERLOADABLE long work_group_scan_exclusive_min(long x);
|
||||
OVERLOADABLE ulong work_group_scan_exclusive_min(ulong x);
|
||||
OVERLOADABLE float work_group_scan_exclusive_min(float x);
|
||||
OVERLOADABLE double work_group_scan_exclusive_min(double x);
|
||||
|
||||
/* scan_exclusive max */
|
||||
OVERLOADABLE int work_group_scan_exclusive_max(int x);
|
||||
OVERLOADABLE uint work_group_scan_exclusive_max(uint x);
|
||||
OVERLOADABLE long work_group_scan_exclusive_max(long x);
|
||||
OVERLOADABLE ulong work_group_scan_exclusive_max(ulong x);
|
||||
OVERLOADABLE float work_group_scan_exclusive_max(float x);
|
||||
OVERLOADABLE double work_group_scan_exclusive_max(double x);
|
||||
#endif /* __OCL_WORK_GROUP_H__ */
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 - 2014 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#ifndef __OCL_WORKITEM_H__
|
||||
#define __OCL_WORKITEM_H__
|
||||
|
||||
#include "ocl_types.h"
|
||||
|
||||
OVERLOADABLE uint get_work_dim(void);
|
||||
OVERLOADABLE size_t get_global_size(uint dimindx);
|
||||
OVERLOADABLE size_t get_global_id(uint dimindx);
|
||||
OVERLOADABLE size_t get_local_size(uint dimindx);
|
||||
OVERLOADABLE size_t get_enqueued_local_size(uint dimindx);
|
||||
OVERLOADABLE size_t get_local_id(uint dimindx);
|
||||
OVERLOADABLE size_t get_num_groups(uint dimindx);
|
||||
OVERLOADABLE size_t get_group_id(uint dimindx);
|
||||
OVERLOADABLE size_t get_global_offset(uint dimindx);
|
||||
OVERLOADABLE size_t get_global_linear_id(void);
|
||||
OVERLOADABLE size_t get_local_linear_id(void);
|
||||
|
||||
#endif /* __OCL_WORKITEM_H__ */
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
libpocl.so.2
|
||||
@@ -1 +0,0 @@
|
||||
libpocl.so.2.16.0
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large.
Load diff
@@ -1,770 +0,0 @@
|
||||
/* This file adds declarations missing from opencl-c.h.
|
||||
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
2024 Pekka Jääskeläinen / Intel Finland Oy
|
||||
Copyright (c) 2017 Michal Babej / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _CLANG_OPENCL_H
|
||||
#define _CLANG_OPENCL_H
|
||||
|
||||
#ifndef SKIP_HEADER_INCLUDE
|
||||
/* Use the declarations shipped with Clang. */
|
||||
#ifndef _OPENCL_H_
|
||||
/* Check for _OPENCL_H already here because the kernel compiler loads the
|
||||
header beforehand, but cannot find the file due to include paths not
|
||||
set up. */
|
||||
#include "opencl-c.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* We can include this header directly (to patch up opencl-c.h without
|
||||
including _kernel.h, thus need to define the attribute macros here. */
|
||||
#ifndef _CL_OVERLOADABLE
|
||||
|
||||
#if __has_attribute(__overloadable__)
|
||||
# define _CL_OVERLOADABLE __attribute__((__overloadable__))
|
||||
#else
|
||||
# define _CL_OVERLOADABLE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _CL_READNONE
|
||||
|
||||
#if __has_attribute(__const__)
|
||||
# define _CL_READNONE __attribute__((__const__))
|
||||
#else
|
||||
# define _CL_READNONE
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef _CL_CONV
|
||||
|
||||
#if __has_attribute(__convergent__)
|
||||
# define _CL_CONV __attribute__((__convergent__))
|
||||
#else
|
||||
# define _CL_CONV
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Some of the geometric builtins are defined only up to 4 vectors, but we
|
||||
implement them all: */
|
||||
#ifdef cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
half _CL_OVERLOADABLE _CL_READNONE length (half8 p);
|
||||
half _CL_OVERLOADABLE _CL_READNONE length (half16 p);
|
||||
|
||||
half _CL_OVERLOADABLE _CL_READNONE fast_length (half8 p);
|
||||
half _CL_OVERLOADABLE _CL_READNONE fast_length (half16 p);
|
||||
|
||||
half8 _CL_OVERLOADABLE _CL_READNONE normalize (half8 p);
|
||||
half16 _CL_OVERLOADABLE _CL_READNONE normalize (half16 p);
|
||||
|
||||
half8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (half8 p);
|
||||
half16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (half16 p);
|
||||
|
||||
half _CL_OVERLOADABLE _CL_READNONE dot (half8 p0, half8 p1);
|
||||
half _CL_OVERLOADABLE _CL_READNONE dot (half16 p0, half16 p1);
|
||||
#endif
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE length (float8 p);
|
||||
float _CL_OVERLOADABLE _CL_READNONE length (float16 p);
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE fast_length (float8 p);
|
||||
float _CL_OVERLOADABLE _CL_READNONE fast_length (float16 p);
|
||||
|
||||
float8 _CL_OVERLOADABLE _CL_READNONE normalize (float8 p);
|
||||
float16 _CL_OVERLOADABLE _CL_READNONE normalize (float16 p);
|
||||
|
||||
float8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (float8 p);
|
||||
float16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (float16 p);
|
||||
|
||||
float _CL_OVERLOADABLE _CL_READNONE dot (float8 p0, float8 p1);
|
||||
float _CL_OVERLOADABLE _CL_READNONE dot (float16 p0, float16 p1);
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE length (double8 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE length (double16 p);
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double2 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double3 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double4 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double8 p);
|
||||
double _CL_OVERLOADABLE _CL_READNONE fast_length (double16 p);
|
||||
|
||||
double8 _CL_OVERLOADABLE _CL_READNONE normalize (double8 p);
|
||||
double16 _CL_OVERLOADABLE _CL_READNONE normalize (double16 p);
|
||||
|
||||
double8 _CL_OVERLOADABLE _CL_READNONE fast_normalize (double8 p);
|
||||
double16 _CL_OVERLOADABLE _CL_READNONE fast_normalize (double16 p);
|
||||
|
||||
double _CL_OVERLOADABLE _CL_READNONE dot (double8 p0, double8 p1);
|
||||
double _CL_OVERLOADABLE _CL_READNONE dot (double16 p0, double16 p1);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(cl_khr_kernel_clock)
|
||||
|
||||
#if defined(__opencl_c_kernel_clock_scope_device)
|
||||
ulong _CL_OVERLOADABLE _CL_CONV clock_read_device(void);
|
||||
uint2 _CL_OVERLOADABLE _CL_CONV clock_read_hilo_device(void);
|
||||
#endif // __opencl_c_kernel_clock_scope_device
|
||||
|
||||
#if defined(__opencl_c_kernel_clock_scope_work_group)
|
||||
ulong _CL_OVERLOADABLE _CL_CONV clock_read_work_group(void);
|
||||
uint2 _CL_OVERLOADABLE _CL_CONV clock_read_hilo_work_group(void);
|
||||
#endif // __opencl_c_kernel_clock_scope_work_group
|
||||
|
||||
#if defined(__opencl_c_kernel_clock_scope_sub_group)
|
||||
ulong _CL_OVERLOADABLE _CL_CONV clock_read_sub_group(void);
|
||||
uint2 _CL_OVERLOADABLE _CL_CONV clock_read_hilo_sub_group(void);
|
||||
#endif // __opencl_c_kernel_clock_scope_sub_group
|
||||
|
||||
#endif // cl_khr_kernel_clock
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#if defined(cl_intel_subgroups_char)
|
||||
/* The char version is missing from opencl-c.h */
|
||||
char _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (char, uint sub_group_local_id);
|
||||
char2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (char2, uint sub_group_local_id);
|
||||
char3 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (char3, uint sub_group_local_id);
|
||||
char4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (char4, uint sub_group_local_id);
|
||||
char8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (char8, uint sub_group_local_id);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (uchar, uint sub_group_local_id);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (uchar2, uint sub_group_local_id);
|
||||
uchar3 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (uchar3, uint sub_group_local_id);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (uchar4, uint sub_group_local_id);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (uchar8, uint sub_group_local_id);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char, uint);
|
||||
char2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char2, uint);
|
||||
char3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char3, uint);
|
||||
char4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char4, uint);
|
||||
char8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char8, uint);
|
||||
char16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (char16, uint);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar, uint);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar2, uint);
|
||||
uchar3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar3, uint);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar4, uint);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar8, uint);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (uchar16, uint);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char cur,
|
||||
char next,
|
||||
uint);
|
||||
char2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char2 cur,
|
||||
char2 next,
|
||||
uint);
|
||||
char3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char3 cur,
|
||||
char3 next,
|
||||
uint);
|
||||
char4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char4 cur,
|
||||
char4 next,
|
||||
uint);
|
||||
char8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char8 cur,
|
||||
char8 next,
|
||||
uint);
|
||||
char16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (char16 cur,
|
||||
char16 next,
|
||||
uint);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (uchar cur,
|
||||
uchar next,
|
||||
uint);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (uchar2 cur,
|
||||
uchar2 next,
|
||||
uint);
|
||||
uchar3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (uchar3 cur,
|
||||
uchar3 next,
|
||||
uint);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (uchar4 cur,
|
||||
uchar4 next,
|
||||
uint);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (uchar8 cur,
|
||||
uchar8 next,
|
||||
uint);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_shuffle_down (uchar16 cur, uchar16 next, uint);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char cur,
|
||||
char next,
|
||||
uint);
|
||||
char2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char2 cur,
|
||||
char2 next,
|
||||
uint);
|
||||
char3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char3 cur,
|
||||
char3 next,
|
||||
uint);
|
||||
char4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char4 cur,
|
||||
char4 next,
|
||||
uint);
|
||||
char8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char8 cur,
|
||||
char8 next,
|
||||
uint);
|
||||
char16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (char16 cur,
|
||||
char16 next,
|
||||
uint);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar cur,
|
||||
uchar next,
|
||||
uint);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar2 cur,
|
||||
uchar2 next,
|
||||
uint);
|
||||
uchar3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar3 cur,
|
||||
uchar3 next,
|
||||
uint);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar4 cur,
|
||||
uchar4 next,
|
||||
uint);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar8 cur,
|
||||
uchar8 next,
|
||||
uint);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (uchar16 cur,
|
||||
uchar16 next,
|
||||
uint);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char, uint);
|
||||
char2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char2, uint);
|
||||
char3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char3, uint);
|
||||
char4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char4, uint);
|
||||
char8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char8, uint);
|
||||
char16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (char16,
|
||||
uint);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar, uint);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar2,
|
||||
uint);
|
||||
uchar3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar3,
|
||||
uint);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar4,
|
||||
uint);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar8,
|
||||
uint);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (uchar16,
|
||||
uint);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_add (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_add (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_min (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_min (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_max (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_max (uchar x);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_add (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_add (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_min (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_min (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_max (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_max (uchar x);
|
||||
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_add (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_add (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_min (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_min (uchar x);
|
||||
char _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_max (char x);
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_max (uchar x);
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc (read_only image2d_t, int2);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc2 (read_only image2d_t, int2);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc4 (read_only image2d_t, int2);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc8 (read_only image2d_t, int2);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc16 (read_only image2d_t, int2);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc (read_write image2d_t, int2);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc2 (read_write image2d_t, int2);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc4 (read_write image2d_t, int2);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc8 (read_write image2d_t, int2);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc16 (read_write image2d_t, int2);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc (const global uchar *p);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc2 (const global uchar *p);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc4 (const global uchar *p);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc8 (const global uchar *p);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc16 (const global uchar *p);
|
||||
|
||||
uchar _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc (const local uchar *p);
|
||||
uchar2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc2 (const local uchar *p);
|
||||
uchar4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc4 (const local uchar *p);
|
||||
uchar8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc8 (const local uchar *p);
|
||||
uchar16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_uc16 (const local uchar *p);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc (global uchar *p,
|
||||
uchar data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc2 (global uchar *p,
|
||||
uchar2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc4 (global uchar *p,
|
||||
uchar4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc8 (global uchar *p,
|
||||
uchar8 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc16 (global uchar *p,
|
||||
uchar16 data);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc (local uchar *p,
|
||||
uchar data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc2 (local uchar *p,
|
||||
uchar2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc4 (local uchar *p,
|
||||
uchar4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc8 (local uchar *p,
|
||||
uchar8 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_uc16 (local uchar *p,
|
||||
uchar16 data);
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc (write_only image2d_t, int2, uchar);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc2 (write_only image2d_t, int2, uchar2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc4 (write_only image2d_t, int2, uchar4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc8 (write_only image2d_t, int2, uchar8);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc16 (write_only image2d_t, int2, uchar16);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc (read_write image2d_t, int2, uchar);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc2 (read_write image2d_t, int2, uchar2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc4 (read_write image2d_t, int2, uchar4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc8 (read_write image2d_t, int2, uchar8);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_uc16 (read_write image2d_t, int2, uchar16);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
#endif // cl_intel_subgroups_char
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#if defined(cl_intel_subgroups_short)
|
||||
/* The short version is missing from opencl-c.h */
|
||||
short _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (short, uint sub_group_local_id);
|
||||
short2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (short2, uint sub_group_local_id);
|
||||
short3 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (short3, uint sub_group_local_id);
|
||||
short4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (short4, uint sub_group_local_id);
|
||||
short8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (short8, uint sub_group_local_id);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (ushort, uint sub_group_local_id);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (ushort2, uint sub_group_local_id);
|
||||
ushort3 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (ushort3, uint sub_group_local_id);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (ushort4, uint sub_group_local_id);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_broadcast (ushort8, uint sub_group_local_id);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short, uint);
|
||||
short2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short2, uint);
|
||||
short3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short3, uint);
|
||||
short4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short4, uint);
|
||||
short8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short8, uint);
|
||||
short16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (short16, uint);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort, uint);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort2, uint);
|
||||
ushort3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort3, uint);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort4, uint);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort8, uint);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle (ushort16, uint);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short cur,
|
||||
short next,
|
||||
uint);
|
||||
short2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short2 cur,
|
||||
short2 next,
|
||||
uint);
|
||||
short3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short3 cur,
|
||||
short3 next,
|
||||
uint);
|
||||
short4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short4 cur,
|
||||
short4 next,
|
||||
uint);
|
||||
short8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short8 cur,
|
||||
short8 next,
|
||||
uint);
|
||||
short16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (short16 cur,
|
||||
short16 next,
|
||||
uint);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (ushort cur,
|
||||
ushort next,
|
||||
uint);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (ushort2 cur,
|
||||
ushort2 next,
|
||||
uint);
|
||||
ushort3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (ushort3 cur,
|
||||
ushort3 next,
|
||||
uint);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (ushort4 cur,
|
||||
ushort4 next,
|
||||
uint);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_down (ushort8 cur,
|
||||
ushort8 next,
|
||||
uint);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_shuffle_down (ushort16 cur, ushort16 next, uint);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short cur,
|
||||
short next,
|
||||
uint);
|
||||
short2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short2 cur,
|
||||
short2 next,
|
||||
uint);
|
||||
short3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short3 cur,
|
||||
short3 next,
|
||||
uint);
|
||||
short4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short4 cur,
|
||||
short4 next,
|
||||
uint);
|
||||
short8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short8 cur,
|
||||
short8 next,
|
||||
uint);
|
||||
short16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (short16 cur,
|
||||
short16 next,
|
||||
uint);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort cur,
|
||||
ushort next,
|
||||
uint);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort2 cur,
|
||||
ushort2 next,
|
||||
uint);
|
||||
ushort3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort3 cur,
|
||||
ushort3 next,
|
||||
uint);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort4 cur,
|
||||
ushort4 next,
|
||||
uint);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort8 cur,
|
||||
ushort8 next,
|
||||
uint);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_up (ushort16 cur,
|
||||
ushort16 next,
|
||||
uint);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short, uint);
|
||||
short2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short2, uint);
|
||||
short3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short3, uint);
|
||||
short4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short4, uint);
|
||||
short8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short8, uint);
|
||||
short16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (short16,
|
||||
uint);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort, uint);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort2,
|
||||
uint);
|
||||
ushort3 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort3,
|
||||
uint);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort4,
|
||||
uint);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort8,
|
||||
uint);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV intel_sub_group_shuffle_xor (ushort16,
|
||||
uint);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_add (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_add (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_min (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_min (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_max (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV intel_sub_group_reduce_max (ushort x);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_add (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_add (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_min (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_min (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_exclusive_max (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_exclusive_max (ushort x);
|
||||
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_add (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_add (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_min (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_min (ushort x);
|
||||
short _CL_OVERLOADABLE _CL_CONV intel_sub_group_scan_inclusive_max (short x);
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_scan_inclusive_max (ushort x);
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us (read_only image2d_t, int2);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us2 (read_only image2d_t, int2);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us4 (read_only image2d_t, int2);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us8 (read_only image2d_t, int2);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us16 (read_only image2d_t, int2);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us (read_write image2d_t, int2);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us2 (read_write image2d_t, int2);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us4 (read_write image2d_t, int2);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us8 (read_write image2d_t, int2);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us16 (read_write image2d_t, int2);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us (const global ushort *p);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us2 (const global ushort *p);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us4 (const global ushort *p);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us8 (const global ushort *p);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us16 (const global ushort *p);
|
||||
|
||||
ushort _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us (const local ushort *p);
|
||||
ushort2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us2 (const local ushort *p);
|
||||
ushort4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us4 (const local ushort *p);
|
||||
ushort8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us8 (const local ushort *p);
|
||||
ushort16 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_us16 (const local ushort *p);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us (global ushort *p,
|
||||
ushort data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us2 (global ushort *p,
|
||||
ushort2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us4 (global ushort *p,
|
||||
ushort4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us8 (global ushort *p,
|
||||
ushort8 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us16 (global ushort *p,
|
||||
ushort16 data);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us (local ushort *p,
|
||||
ushort data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us2 (local ushort *p,
|
||||
ushort2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us4 (local ushort *p,
|
||||
ushort4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us8 (local ushort *p,
|
||||
ushort8 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_us16 (local ushort *p,
|
||||
ushort16 data);
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us (write_only image2d_t, int2, ushort);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us2 (write_only image2d_t, int2, ushort2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us4 (write_only image2d_t, int2, ushort4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us8 (write_only image2d_t, int2, ushort8);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us16 (write_only image2d_t, int2, ushort16);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us (read_write image2d_t, int2, ushort);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us2 (read_write image2d_t, int2, ushort2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us4 (read_write image2d_t, int2, ushort4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us8 (read_write image2d_t, int2, ushort8);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_us16 (read_write image2d_t, int2, ushort16);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
#endif // cl_intel_subgroups_short
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#if defined(cl_intel_subgroups_long)
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
ulong _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul (read_only image2d_t, int2);
|
||||
ulong2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul2 (read_only image2d_t, int2);
|
||||
ulong4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul4 (read_only image2d_t, int2);
|
||||
ulong8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul8 (read_only image2d_t, int2);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
ulong _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul (read_write image2d_t, int2);
|
||||
ulong2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul2 (read_write image2d_t, int2);
|
||||
ulong4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul4 (read_write image2d_t, int2);
|
||||
ulong8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul8 (read_write image2d_t, int2);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
ulong _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul (const global ulong *p);
|
||||
ulong2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul2 (const global ulong *p);
|
||||
ulong4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul4 (const global ulong *p);
|
||||
ulong8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul8 (const global ulong *p);
|
||||
|
||||
ulong _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul (const local ulong *p);
|
||||
ulong2 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul2 (const local ulong *p);
|
||||
ulong4 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul4 (const local ulong *p);
|
||||
ulong8 _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_read_ul8 (const local ulong *p);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul (global ulong *p,
|
||||
ulong data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul2 (global ulong *p,
|
||||
ulong2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul4 (global ulong *p,
|
||||
ulong4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul8 (global ulong *p,
|
||||
ulong8 data);
|
||||
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul (local ulong *p,
|
||||
ulong data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul2 (local ulong *p,
|
||||
ulong2 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul4 (local ulong *p,
|
||||
ulong4 data);
|
||||
void _CL_OVERLOADABLE _CL_CONV intel_sub_group_block_write_ul8 (local ulong *p,
|
||||
ulong8 data);
|
||||
|
||||
#if defined(__opencl_c_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul (write_only image2d_t, int2, ulong);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul2 (write_only image2d_t, int2, ulong2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul4 (write_only image2d_t, int2, ulong4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul8 (write_only image2d_t, int2, ulong8);
|
||||
|
||||
#if defined(__opencl_c_read_write_images)
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul (read_write image2d_t, int2, ulong);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul2 (read_write image2d_t, int2, ulong2);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul4 (read_write image2d_t, int2, ulong4);
|
||||
void _CL_OVERLOADABLE _CL_CONV
|
||||
intel_sub_group_block_write_ul8 (read_write image2d_t, int2, ulong8);
|
||||
#endif // defined(__opencl_c_read_write_images)
|
||||
#endif // defined(__opencl_c_images)
|
||||
|
||||
#endif // cl_intel_subgroups_long
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
#ifdef cl_intel_split_work_group_barrier
|
||||
void _CL_OVERLOADABLE
|
||||
intel_work_group_barrier_arrive (cl_mem_fence_flags flags);
|
||||
void _CL_OVERLOADABLE intel_work_group_barrier_wait (cl_mem_fence_flags flags);
|
||||
// For OpenCL C 2.0 or newer:
|
||||
#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
|
||||
void _CL_OVERLOADABLE
|
||||
intel_work_group_barrier_arrive (cl_mem_fence_flags flags, memory_scope scope);
|
||||
void _CL_OVERLOADABLE intel_work_group_barrier_wait (cl_mem_fence_flags flags,
|
||||
memory_scope scope);
|
||||
#endif
|
||||
#endif // cl_intel_split_work_group_barrier
|
||||
|
||||
#endif
|
||||
@@ -1,53 +0,0 @@
|
||||
/* Enable all extensions known to pocl, which a device supports.
|
||||
* This is required at the start of include/_kernel.h for prototypes,
|
||||
* then at kernel lib compilation phase (because _kernel.h disables
|
||||
* everything at the end).
|
||||
*/
|
||||
|
||||
/* OpenCL 1.0-only extensions */
|
||||
|
||||
#if (__OPENCL_C_VERSION__ < 110)
|
||||
|
||||
#ifdef cl_khr_global_int32_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_global_int32_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_local_int32_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_local_int32_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_byte_addressable_store
|
||||
# pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* all versions */
|
||||
#ifdef cl_khr_fp16
|
||||
# pragma OPENCL EXTENSION cl_khr_fp16: enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
# pragma OPENCL EXTENSION cl_khr_fp64: enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64_base_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_int64_base_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64_extended_atomics
|
||||
# pragma OPENCL EXTENSION cl_khr_int64_extended_atomics : enable
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_3d_image_writes
|
||||
# pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
|
||||
#endif
|
||||
@@ -1,179 +0,0 @@
|
||||
/* pocl/_kernel.h - OpenCL types and runtime library
|
||||
functions declarations. This should be included only from OpenCL C files.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <[email protected]>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* If the -cl-std build option is not specified, the highest OpenCL C 1.x
|
||||
* language version supported by each device is used as the version of
|
||||
* OpenCL C when compiling the program for each device.
|
||||
*/
|
||||
#ifndef __OPENCL_C_VERSION__
|
||||
#define __OPENCL_C_VERSION__ 120
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 99)
|
||||
#define CL_VERSION_1_0 100
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 109)
|
||||
#define CL_VERSION_1_1 110
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 119)
|
||||
#define CL_VERSION_1_2 120
|
||||
#endif
|
||||
|
||||
#if (__OPENCL_C_VERSION__ > 199)
|
||||
#define CL_VERSION_2_0 200
|
||||
#endif
|
||||
|
||||
#include "_enable_all_exts.h"
|
||||
|
||||
#include "_builtin_renames.h"
|
||||
|
||||
/* Define some feature test macros to help write generic code. These are used
|
||||
* mostly in _pocl_opencl.h header + some .cl files in kernel library */
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
# define __IF_INT64(x) x
|
||||
#else
|
||||
# define __IF_INT64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_fp16
|
||||
# define __IF_FP16(x) x
|
||||
#else
|
||||
# define __IF_FP16(x)
|
||||
#endif
|
||||
#ifdef cl_khr_fp64
|
||||
# define __IF_FP64(x) x
|
||||
#else
|
||||
# define __IF_FP64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_int64_base_atomics
|
||||
#define __IF_BA64(x) x
|
||||
#else
|
||||
#define __IF_BA64(x)
|
||||
#endif
|
||||
#ifdef cl_khr_int64_extended_atomics
|
||||
#define __IF_EA64(x) x
|
||||
#else
|
||||
#define __IF_EA64(x)
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* Function/type attributes supported by Clang/SPIR */
|
||||
#if __has_attribute(__always_inline__)
|
||||
# define _CL_ALWAYSINLINE __attribute__((__always_inline__))
|
||||
#else
|
||||
# define _CL_ALWAYSINLINE
|
||||
#endif
|
||||
#if __has_attribute(__noinline__)
|
||||
# define _CL_NOINLINE __attribute__((__noinline__))
|
||||
#else
|
||||
# define _CL_NOINLINE
|
||||
#endif
|
||||
#if __has_attribute(__overloadable__)
|
||||
# define _CL_OVERLOADABLE __attribute__((__overloadable__))
|
||||
#else
|
||||
# define _CL_OVERLOADABLE
|
||||
#endif
|
||||
#if __has_attribute(__pure__)
|
||||
# define _CL_READONLY __attribute__((__pure__))
|
||||
#else
|
||||
# define _CL_READONLY
|
||||
#endif
|
||||
#if __has_attribute(__const__)
|
||||
# define _CL_READNONE __attribute__((__const__))
|
||||
#else
|
||||
# define _CL_READNONE
|
||||
#endif
|
||||
#if __has_attribute(convergent)
|
||||
# define _CL_CONVERGENT __attribute__((convergent))
|
||||
#else
|
||||
# define _CL_CONVERGENT
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* A static assert statement to catch inconsistencies at build time */
|
||||
#if __has_extension(__c_static_assert__)
|
||||
# define _CL_STATIC_ASSERT(_t, _x) _Static_assert(_x, #_t)
|
||||
#else
|
||||
# define _CL_STATIC_ASSERT(_t, _x) typedef int __cl_ai##_t[(x) ? 1 : -1];
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#define IMG_RO_AQ __read_only
|
||||
#define IMG_WO_AQ __write_only
|
||||
|
||||
#ifdef __opencl_c_read_write_images
|
||||
#define CLANG_HAS_RW_IMAGES
|
||||
#define IMG_RW_AQ __read_write
|
||||
#else
|
||||
#undef CLANG_HAS_RW_IMAGES
|
||||
#define IMG_RW_AQ __RW_IMAGES_UNSUPPORTED_BEFORE_CL_20
|
||||
#endif
|
||||
|
||||
/****************************************************************************/
|
||||
/* use Clang opencl header for definitions. */
|
||||
|
||||
#ifdef POCL_DEVICE_ADDRESS_BITS
|
||||
|
||||
/* If we wish to override the Clang set __SIZE_TYPE__ for this target,
|
||||
let's do it here so the opencl-c.h sets size_t to the wanted type. */
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#if POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#elif POCL_DEVICE_ADDRESS_BITS == 64
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#else
|
||||
#error Unsupported POCL_DEVICE_ADDRESS_BITS value.
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "_clang_opencl.h"
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/* GNU's libm seems to use INT_MIN here while the Clang's header uses
|
||||
INT_MAX. Both are allowed by the OpenCL specs, but we want them to
|
||||
be unified to avoid failing tests. */
|
||||
#undef FP_ILOGBNAN
|
||||
#undef FP_ILOGB0
|
||||
#define FP_ILOGB0 INT_MIN
|
||||
#define FP_ILOGBNAN INT_MAX
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#include "pocl_image_types.h"
|
||||
|
||||
#pragma OPENCL EXTENSION all : disable
|
||||
@@ -1,199 +0,0 @@
|
||||
/* pocl/_kernel_c.h - C compatible OpenCL types and runtime library
|
||||
functions declarations for kernel builtin implementations using C.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2017 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <[email protected]>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* Header that can be implemented in C compiled implementations of
|
||||
* built-in functions to introduce the OpenCL C compatible types etc.
|
||||
*/
|
||||
#ifndef _KERNEL_C_H
|
||||
#define _KERNEL_C_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
/* cannot include "_builtin_renames.h" because it overrides some C/C++ macros,
|
||||
but we need the prefixed functions in the builtin library */
|
||||
#define POCL_BUILTIN_PREFIX(FUNC) _cl_##FUNC
|
||||
|
||||
#include "_kernel_constants.h"
|
||||
|
||||
/* Function/type attributes supported by Clang/SPIR */
|
||||
#if __has_attribute(__always_inline__)
|
||||
# define _CL_ALWAYSINLINE __attribute__((__always_inline__))
|
||||
#else
|
||||
# define _CL_ALWAYSINLINE
|
||||
#endif
|
||||
#if __has_attribute(__noinline__)
|
||||
# define _CL_NOINLINE __attribute__((__noinline__))
|
||||
#else
|
||||
# define _CL_NOINLINE
|
||||
#endif
|
||||
#if __has_attribute(__overloadable__)
|
||||
# define _CL_OVERLOADABLE __attribute__((__overloadable__))
|
||||
#else
|
||||
# define _CL_OVERLOADABLE
|
||||
#endif
|
||||
#if __has_attribute(__pure__)
|
||||
# define _CL_READONLY __attribute__((__pure__))
|
||||
#else
|
||||
# define _CL_READONLY
|
||||
#endif
|
||||
#if __has_attribute(__const__)
|
||||
# define _CL_READNONE __attribute__((__const__))
|
||||
#else
|
||||
# define _CL_READNONE
|
||||
#endif
|
||||
#if __has_attribute(convergent)
|
||||
# define _CL_CONVERGENT __attribute__((convergent))
|
||||
#else
|
||||
# define _CL_CONVERGENT
|
||||
#endif
|
||||
#if __has_attribute(optnone)
|
||||
#define _CL_OPTNONE __attribute__ ((optnone))
|
||||
#else
|
||||
#define _CL_OPTNONE
|
||||
#endif
|
||||
|
||||
typedef char char2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef char char3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef char char4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef char char8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef char char16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef uchar uchar2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef uchar uchar3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef uchar uchar4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef uchar uchar8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef uchar uchar16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef short short2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef short short3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef short short4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef short short8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef short short16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef ushort ushort2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef ushort ushort3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef ushort ushort4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef ushort ushort8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef ushort ushort16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef int int2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef int int3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef int int4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef int int8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef int int16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef uint uint2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef uint uint3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef uint uint4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef uint uint8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef uint uint16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
#if defined(__CBUILD__) && defined(cl_khr_fp16)
|
||||
|
||||
#ifdef _HAS_FLOAT16_TYPE
|
||||
typedef _Float16 half;
|
||||
#else
|
||||
typedef __fp16 half;
|
||||
#endif
|
||||
|
||||
typedef half half2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef half half3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef half half4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef half half8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef half half16 __attribute__((__ext_vector_type__(16)));
|
||||
#endif
|
||||
|
||||
typedef float float2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef float float3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef float float4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef float float8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef float float16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
# ifndef __CBUILD__
|
||||
# pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
# endif
|
||||
typedef double double2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef double double3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef double double4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef double double8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef double double16 __attribute__((__ext_vector_type__(16)));
|
||||
#endif
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
typedef long long2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef long long3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef long long4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef long long8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef long long16 __attribute__((__ext_vector_type__(16)));
|
||||
|
||||
typedef ulong ulong2 __attribute__((__ext_vector_type__(2)));
|
||||
typedef ulong ulong3 __attribute__((__ext_vector_type__(3)));
|
||||
typedef ulong ulong4 __attribute__((__ext_vector_type__(4)));
|
||||
typedef ulong ulong8 __attribute__((__ext_vector_type__(8)));
|
||||
typedef ulong ulong16 __attribute__((__ext_vector_type__(16)));
|
||||
#endif
|
||||
|
||||
#if defined(__TCE__)
|
||||
|
||||
#define POCL_ADDRESS_SPACE_PRIVATE 0
|
||||
#define POCL_ADDRESS_SPACE_GLOBAL 1
|
||||
#define POCL_ADDRESS_SPACE_LOCAL 3
|
||||
#define POCL_ADDRESS_SPACE_CONSTANT 2
|
||||
#define POCL_ADDRESS_SPACE_GENERIC 6
|
||||
|
||||
#endif
|
||||
|
||||
typedef uint cl_mem_fence_flags;
|
||||
|
||||
/* Integer Constants */
|
||||
|
||||
#if defined(__CBUILD__)
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-2147483647 - 1)
|
||||
#ifdef cl_khr_int64
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL - 1)
|
||||
#endif
|
||||
#define SCHAR_MAX 127
|
||||
#define SCHAR_MIN (-127 - 1)
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-32767 - 1)
|
||||
#define UCHAR_MAX 255
|
||||
#define USHRT_MAX 65535
|
||||
#define UINT_MAX 0xffffffff
|
||||
#ifdef cl_khr_int64
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#endif
|
||||
|
||||
#endif /* __CBUILD__ */
|
||||
|
||||
#endif
|
||||
@@ -1,93 +0,0 @@
|
||||
/* pocl/_kernel_constants.h - C compatible OpenCL types and runtime library
|
||||
constants declarations.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
Copyright (c) 2011-2013 Pekka Jääskeläinen / TUT
|
||||
Copyright (c) 2011-2013 Erik Schnetter <[email protected]>
|
||||
Perimeter Institute for Theoretical Physics
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
/**
|
||||
* Header that can be implemented in C compiled implementations of
|
||||
* built-in functions to introduce the OpenCL C compatible constants.
|
||||
*/
|
||||
#ifndef _KERNEL_CONSTANTS_H
|
||||
#define _KERNEL_CONSTANTS_H
|
||||
|
||||
/* clang's header defines these */
|
||||
#ifndef _OPENCL_H_
|
||||
|
||||
/* cl_channel_order */
|
||||
#define CLK_R 0x10B0
|
||||
#define CLK_A 0x10B1
|
||||
#define CLK_RG 0x10B2
|
||||
#define CLK_RA 0x10B3
|
||||
#define CLK_RGB 0x10B4
|
||||
#define CLK_RGBA 0x10B5
|
||||
#define CLK_BGRA 0x10B6
|
||||
#define CLK_ARGB 0x10B7
|
||||
#define CLK_INTENSITY 0x10B8
|
||||
#define CLK_LUMINANCE 0x10B9
|
||||
#define CLK_Rx 0x10BA
|
||||
#define CLK_RGx 0x10BB
|
||||
#define CLK_RGBx 0x10BC
|
||||
#define CLK_DEPTH 0x10BD
|
||||
#define CLK_DEPTH_STENCIL 0x10BE
|
||||
|
||||
/* cl_channel_type */
|
||||
#define CLK_SNORM_INT8 0x10D0
|
||||
#define CLK_SNORM_INT16 0x10D1
|
||||
#define CLK_UNORM_INT8 0x10D2
|
||||
#define CLK_UNORM_INT16 0x10D3
|
||||
#define CLK_UNORM_SHORT_565 0x10D4
|
||||
#define CLK_UNORM_SHORT_555 0x10D5
|
||||
#define CLK_UNORM_INT_101010 0x10D6
|
||||
#define CLK_SIGNED_INT8 0x10D7
|
||||
#define CLK_SIGNED_INT16 0x10D8
|
||||
#define CLK_SIGNED_INT32 0x10D9
|
||||
#define CLK_UNSIGNED_INT8 0x10DA
|
||||
#define CLK_UNSIGNED_INT16 0x10DB
|
||||
#define CLK_UNSIGNED_INT32 0x10DC
|
||||
#define CLK_HALF_FLOAT 0x10DD
|
||||
#define CLK_FLOAT 0x10DE
|
||||
#define CLK_UNORM_INT24 0x10DF
|
||||
|
||||
/* cl_addressing _mode */
|
||||
#define CLK_ADDRESS_NONE 0x00
|
||||
#define CLK_ADDRESS_CLAMP_TO_EDGE 0x02
|
||||
#define CLK_ADDRESS_CLAMP 0x04
|
||||
#define CLK_ADDRESS_REPEAT 0x06
|
||||
#define CLK_ADDRESS_MIRRORED_REPEAT 0x08
|
||||
|
||||
/* cl_sampler_info */
|
||||
#define CLK_NORMALIZED_COORDS_FALSE 0x00
|
||||
#define CLK_NORMALIZED_COORDS_TRUE 0x01
|
||||
|
||||
/* filter_mode */
|
||||
#define CLK_FILTER_NEAREST 0x10
|
||||
#define CLK_FILTER_LINEAR 0x20
|
||||
|
||||
/* barrier() flags */
|
||||
#define CLK_LOCAL_MEM_FENCE 0x01
|
||||
#define CLK_GLOBAL_MEM_FENCE 0x02
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,830 +0,0 @@
|
||||
//===----- opencl-c-base.h - OpenCL C language base definitions -----------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef _OPENCL_BASE_H_
|
||||
#define _OPENCL_BASE_H_
|
||||
|
||||
// Define extension macros
|
||||
|
||||
#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
|
||||
// For SPIR and SPIR-V all extensions are supported.
|
||||
#if defined(__SPIR__) || defined(__SPIRV__)
|
||||
#define cl_khr_subgroup_extended_types 1
|
||||
#define cl_khr_subgroup_non_uniform_vote 1
|
||||
#define cl_khr_subgroup_ballot 1
|
||||
#define cl_khr_subgroup_non_uniform_arithmetic 1
|
||||
#define cl_khr_subgroup_shuffle 1
|
||||
#define cl_khr_subgroup_shuffle_relative 1
|
||||
#define cl_khr_subgroup_clustered_reduce 1
|
||||
#define cl_khr_subgroup_rotate 1
|
||||
#define cl_khr_extended_bit_ops 1
|
||||
#define cl_khr_integer_dot_product 1
|
||||
#define __opencl_c_integer_dot_product_input_4x8bit 1
|
||||
#define __opencl_c_integer_dot_product_input_4x8bit_packed 1
|
||||
#define cl_ext_float_atomics 1
|
||||
#ifdef cl_khr_fp16
|
||||
#define __opencl_c_ext_fp16_global_atomic_load_store 1
|
||||
#define __opencl_c_ext_fp16_local_atomic_load_store 1
|
||||
#define __opencl_c_ext_fp16_global_atomic_add 1
|
||||
#define __opencl_c_ext_fp16_local_atomic_add 1
|
||||
#define __opencl_c_ext_fp16_global_atomic_min_max 1
|
||||
#define __opencl_c_ext_fp16_local_atomic_min_max 1
|
||||
#endif
|
||||
#ifdef cl_khr_fp64
|
||||
#define __opencl_c_ext_fp64_global_atomic_add 1
|
||||
#define __opencl_c_ext_fp64_local_atomic_add 1
|
||||
#define __opencl_c_ext_fp64_global_atomic_min_max 1
|
||||
#define __opencl_c_ext_fp64_local_atomic_min_max 1
|
||||
#endif
|
||||
#define __opencl_c_ext_fp32_global_atomic_add 1
|
||||
#define __opencl_c_ext_fp32_local_atomic_add 1
|
||||
#define __opencl_c_ext_fp32_global_atomic_min_max 1
|
||||
#define __opencl_c_ext_fp32_local_atomic_min_max 1
|
||||
|
||||
#endif // defined(__SPIR__) || defined(__SPIRV__)
|
||||
#endif // (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 200)
|
||||
|
||||
// Define feature macros for OpenCL C 2.0
|
||||
#if (__OPENCL_CPP_VERSION__ == 100 || __OPENCL_C_VERSION__ == 200)
|
||||
#define __opencl_c_pipes 1
|
||||
#define __opencl_c_generic_address_space 1
|
||||
#define __opencl_c_work_group_collective_functions 1
|
||||
#define __opencl_c_atomic_order_acq_rel 1
|
||||
#define __opencl_c_atomic_order_seq_cst 1
|
||||
#define __opencl_c_atomic_scope_device 1
|
||||
#define __opencl_c_atomic_scope_all_devices 1
|
||||
#define __opencl_c_device_enqueue 1
|
||||
#define __opencl_c_read_write_images 1
|
||||
#define __opencl_c_program_scope_global_variables 1
|
||||
#define __opencl_c_images 1
|
||||
#endif
|
||||
|
||||
// Define header-only feature macros for OpenCL C 3.0.
|
||||
#if (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
|
||||
// For the SPIR and SPIR-V target all features are supported.
|
||||
#if defined(__SPIR__) || defined(__SPIRV__)
|
||||
#define __opencl_c_work_group_collective_functions 1
|
||||
#define __opencl_c_atomic_order_seq_cst 1
|
||||
#define __opencl_c_atomic_scope_device 1
|
||||
#define __opencl_c_atomic_scope_all_devices 1
|
||||
#define __opencl_c_read_write_images 1
|
||||
#endif // defined(__SPIR__)
|
||||
|
||||
// Undefine any feature macros that have been explicitly disabled using
|
||||
// an __undef_<feature> macro.
|
||||
#ifdef __undef___opencl_c_work_group_collective_functions
|
||||
#undef __opencl_c_work_group_collective_functions
|
||||
#endif
|
||||
#ifdef __undef___opencl_c_atomic_order_seq_cst
|
||||
#undef __opencl_c_atomic_order_seq_cst
|
||||
#endif
|
||||
#ifdef __undef___opencl_c_atomic_scope_device
|
||||
#undef __opencl_c_atomic_scope_device
|
||||
#endif
|
||||
#ifdef __undef___opencl_c_atomic_scope_all_devices
|
||||
#undef __opencl_c_atomic_scope_all_devices
|
||||
#endif
|
||||
#ifdef __undef___opencl_c_read_write_images
|
||||
#undef __opencl_c_read_write_images
|
||||
#endif
|
||||
|
||||
#endif // (__OPENCL_CPP_VERSION__ == 202100 || __OPENCL_C_VERSION__ == 300)
|
||||
|
||||
#if !defined(__opencl_c_generic_address_space)
|
||||
// Internal feature macro to provide named (global, local, private) address
|
||||
// space overloads for builtin functions that take a pointer argument.
|
||||
#define __opencl_c_named_address_space_builtins 1
|
||||
#endif // !defined(__opencl_c_generic_address_space)
|
||||
|
||||
#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
|
||||
// Internal feature macro to provide subgroup builtins.
|
||||
#define __opencl_subgroup_builtins 1
|
||||
#endif
|
||||
|
||||
// built-in scalar data types:
|
||||
|
||||
/**
|
||||
* An unsigned 8-bit integer.
|
||||
*/
|
||||
typedef unsigned char uchar;
|
||||
|
||||
/**
|
||||
* An unsigned 16-bit integer.
|
||||
*/
|
||||
typedef unsigned short ushort;
|
||||
|
||||
/**
|
||||
* An unsigned 32-bit integer.
|
||||
*/
|
||||
typedef unsigned int uint;
|
||||
|
||||
/**
|
||||
* An unsigned 64-bit integer.
|
||||
*/
|
||||
typedef unsigned long ulong;
|
||||
|
||||
/**
|
||||
* The unsigned integer type of the result of the sizeof operator. This
|
||||
* is a 32-bit unsigned integer if CL_DEVICE_ADDRESS_BITS
|
||||
* defined in table 4.3 is 32-bits and is a 64-bit unsigned integer if
|
||||
* CL_DEVICE_ADDRESS_BITS is 64-bits.
|
||||
*/
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
/**
|
||||
* A signed integer type that is the result of subtracting two pointers.
|
||||
* This is a 32-bit signed integer if CL_DEVICE_ADDRESS_BITS
|
||||
* defined in table 4.3 is 32-bits and is a 64-bit signed integer if
|
||||
* CL_DEVICE_ADDRESS_BITS is 64-bits.
|
||||
*/
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
|
||||
/**
|
||||
* A signed integer type with the property that any valid pointer to
|
||||
* void can be converted to this type, then converted back to pointer
|
||||
* to void, and the result will compare equal to the original pointer.
|
||||
*/
|
||||
typedef __INTPTR_TYPE__ intptr_t;
|
||||
|
||||
/**
|
||||
* An unsigned integer type with the property that any valid pointer to
|
||||
* void can be converted to this type, then converted back to pointer
|
||||
* to void, and the result will compare equal to the original pointer.
|
||||
*/
|
||||
typedef __UINTPTR_TYPE__ uintptr_t;
|
||||
|
||||
// built-in vector data types:
|
||||
typedef char char2 __attribute__((ext_vector_type(2))) __attribute__((aligned(2)));
|
||||
typedef char char3 __attribute__((ext_vector_type(3))) __attribute__((aligned(4)));
|
||||
typedef char char4 __attribute__((ext_vector_type(4))) __attribute__((aligned(4)));
|
||||
typedef char char8 __attribute__((ext_vector_type(8))) __attribute__((aligned(8)));
|
||||
typedef char char16 __attribute__((ext_vector_type(16))) __attribute__((aligned(16)));
|
||||
|
||||
typedef uchar uchar2 __attribute__((ext_vector_type(2))) __attribute__((aligned(2)));
|
||||
typedef uchar uchar3 __attribute__((ext_vector_type(3))) __attribute__((aligned(4)));
|
||||
typedef uchar uchar4 __attribute__((ext_vector_type(4))) __attribute__((aligned(4)));
|
||||
typedef uchar uchar8 __attribute__((ext_vector_type(8))) __attribute__((aligned(8)));
|
||||
typedef uchar uchar16 __attribute__((ext_vector_type(16))) __attribute__((aligned(16)));
|
||||
|
||||
typedef short short2 __attribute__((ext_vector_type(2))) __attribute__((aligned(4)));
|
||||
typedef short short3 __attribute__((ext_vector_type(3))) __attribute__((aligned(8)));
|
||||
typedef short short4 __attribute__((ext_vector_type(4))) __attribute__((aligned(8)));
|
||||
typedef short short8 __attribute__((ext_vector_type(8))) __attribute__((aligned(16)));
|
||||
typedef short short16 __attribute__((ext_vector_type(16))) __attribute__((aligned(32)));
|
||||
|
||||
typedef ushort ushort2 __attribute__((ext_vector_type(2))) __attribute__((aligned(4)));
|
||||
typedef ushort ushort3 __attribute__((ext_vector_type(3))) __attribute__((aligned(8)));
|
||||
typedef ushort ushort4 __attribute__((ext_vector_type(4))) __attribute__((aligned(8)));
|
||||
typedef ushort ushort8 __attribute__((ext_vector_type(8))) __attribute__((aligned(16)));
|
||||
typedef ushort ushort16 __attribute__((ext_vector_type(16))) __attribute__((aligned(32)));
|
||||
|
||||
typedef int int2 __attribute__((ext_vector_type(2))) __attribute__((aligned(8)));
|
||||
typedef int int3 __attribute__((ext_vector_type(3))) __attribute__((aligned(16)));
|
||||
typedef int int4 __attribute__((ext_vector_type(4))) __attribute__((aligned(16)));
|
||||
typedef int int8 __attribute__((ext_vector_type(8))) __attribute__((aligned(32)));
|
||||
typedef int int16 __attribute__((ext_vector_type(16))) __attribute__((aligned(64)));
|
||||
|
||||
typedef uint uint2 __attribute__((ext_vector_type(2))) __attribute__((aligned(8)));
|
||||
typedef uint uint3 __attribute__((ext_vector_type(3))) __attribute__((aligned(16)));
|
||||
typedef uint uint4 __attribute__((ext_vector_type(4))) __attribute__((aligned(16)));
|
||||
typedef uint uint8 __attribute__((ext_vector_type(8))) __attribute__((aligned(32)));
|
||||
typedef uint uint16 __attribute__((ext_vector_type(16))) __attribute__((aligned(64)));
|
||||
|
||||
typedef long long2 __attribute__((ext_vector_type(2))) __attribute__((aligned(16)));
|
||||
typedef long long3 __attribute__((ext_vector_type(3))) __attribute__((aligned(32)));
|
||||
typedef long long4 __attribute__((ext_vector_type(4))) __attribute__((aligned(32)));
|
||||
typedef long long8 __attribute__((ext_vector_type(8))) __attribute__((aligned(64)));
|
||||
typedef long long16 __attribute__((ext_vector_type(16))) __attribute__((aligned(128)));
|
||||
|
||||
typedef ulong ulong2 __attribute__((ext_vector_type(2))) __attribute__((aligned(16)));
|
||||
typedef ulong ulong3 __attribute__((ext_vector_type(3))) __attribute__((aligned(32)));
|
||||
typedef ulong ulong4 __attribute__((ext_vector_type(4))) __attribute__((aligned(32)));
|
||||
typedef ulong ulong8 __attribute__((ext_vector_type(8))) __attribute__((aligned(64)));
|
||||
typedef ulong ulong16 __attribute__((ext_vector_type(16))) __attribute__((aligned(128)));
|
||||
|
||||
typedef float float2 __attribute__((ext_vector_type(2))) __attribute__((aligned(8)));
|
||||
typedef float float3 __attribute__((ext_vector_type(3))) __attribute__((aligned(16)));
|
||||
typedef float float4 __attribute__((ext_vector_type(4))) __attribute__((aligned(16)));
|
||||
typedef float float8 __attribute__((ext_vector_type(8))) __attribute__((aligned(32)));
|
||||
typedef float float16 __attribute__((ext_vector_type(16))) __attribute__((aligned(64)));
|
||||
|
||||
#ifdef cl_khr_fp16
|
||||
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
||||
typedef half half2 __attribute__((ext_vector_type(2))) __attribute__((aligned(4)));
|
||||
typedef half half3 __attribute__((ext_vector_type(3))) __attribute__((aligned(8)));
|
||||
typedef half half4 __attribute__((ext_vector_type(4))) __attribute__((aligned(8)));
|
||||
typedef half half8 __attribute__((ext_vector_type(8))) __attribute__((aligned(16)));
|
||||
typedef half half16 __attribute__((ext_vector_type(16))) __attribute__((aligned(32)));
|
||||
#endif
|
||||
#ifdef cl_khr_fp64
|
||||
#if __OPENCL_C_VERSION__ < CL_VERSION_1_2
|
||||
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
||||
#endif
|
||||
typedef double double2 __attribute__((ext_vector_type(2))) __attribute__((aligned(16)));
|
||||
typedef double double3 __attribute__((ext_vector_type(3))) __attribute__((aligned(32)));
|
||||
typedef double double4 __attribute__((ext_vector_type(4))) __attribute__((aligned(32)));
|
||||
typedef double double8 __attribute__((ext_vector_type(8))) __attribute__((aligned(64)));
|
||||
typedef double double16 __attribute__((ext_vector_type(16))) __attribute__((aligned(128)));
|
||||
#endif
|
||||
|
||||
|
||||
// An internal alias for half, for use by OpenCLBuiltins.td.
|
||||
#define __half half
|
||||
|
||||
#if defined(__OPENCL_CPP_VERSION__)
|
||||
#define NULL nullptr
|
||||
#elif defined(__OPENCL_C_VERSION__)
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Value of maximum non-infinite single-precision floating-point
|
||||
* number.
|
||||
*/
|
||||
#define MAXFLOAT 0x1.fffffep127f
|
||||
|
||||
/**
|
||||
* A positive float constant expression. HUGE_VALF evaluates
|
||||
* to +infinity. Used as an error value returned by the built-in
|
||||
* math functions.
|
||||
*/
|
||||
#define HUGE_VALF (__builtin_huge_valf())
|
||||
|
||||
/**
|
||||
* A positive double constant expression. HUGE_VAL evaluates
|
||||
* to +infinity. Used as an error value returned by the built-in
|
||||
* math functions.
|
||||
*/
|
||||
#define HUGE_VAL (__builtin_huge_val())
|
||||
|
||||
/**
|
||||
* A constant expression of type float representing positive or
|
||||
* unsigned infinity.
|
||||
*/
|
||||
#define INFINITY (__builtin_inff())
|
||||
|
||||
/**
|
||||
* A constant expression of type float representing a quiet NaN.
|
||||
*/
|
||||
#define NAN as_float(INT_MAX)
|
||||
|
||||
#define FP_ILOGB0 INT_MIN
|
||||
#define FP_ILOGBNAN INT_MAX
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MAX_10_EXP +38
|
||||
#define FLT_MAX_EXP +128
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MIN_EXP -125
|
||||
#define FLT_RADIX 2
|
||||
#define FLT_MAX 0x1.fffffep127f
|
||||
#define FLT_MIN 0x1.0p-126f
|
||||
#define FLT_EPSILON 0x1.0p-23f
|
||||
|
||||
#define M_E_F 2.71828182845904523536028747135266250f
|
||||
#define M_LOG2E_F 1.44269504088896340735992468100189214f
|
||||
#define M_LOG10E_F 0.434294481903251827651128918916605082f
|
||||
#define M_LN2_F 0.693147180559945309417232121458176568f
|
||||
#define M_LN10_F 2.30258509299404568401799145468436421f
|
||||
#define M_PI_F 3.14159265358979323846264338327950288f
|
||||
#define M_PI_2_F 1.57079632679489661923132169163975144f
|
||||
#define M_PI_4_F 0.785398163397448309615660845819875721f
|
||||
#define M_1_PI_F 0.318309886183790671537767526745028724f
|
||||
#define M_2_PI_F 0.636619772367581343075535053490057448f
|
||||
#define M_2_SQRTPI_F 1.12837916709551257389615890312154517f
|
||||
#define M_SQRT2_F 1.41421356237309504880168872420969808f
|
||||
#define M_SQRT1_2_F 0.707106781186547524400844362104849039f
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX_10_EXP +308
|
||||
#define DBL_MAX_EXP +1024
|
||||
#define DBL_MIN_10_EXP -307
|
||||
#define DBL_MIN_EXP -1021
|
||||
#define DBL_RADIX 2
|
||||
#define DBL_MAX 0x1.fffffffffffffp1023
|
||||
#define DBL_MIN 0x1.0p-1022
|
||||
#define DBL_EPSILON 0x1.0p-52
|
||||
|
||||
#define M_E 0x1.5bf0a8b145769p+1
|
||||
#define M_LOG2E 0x1.71547652b82fep+0
|
||||
#define M_LOG10E 0x1.bcb7b1526e50ep-2
|
||||
#define M_LN2 0x1.62e42fefa39efp-1
|
||||
#define M_LN10 0x1.26bb1bbb55516p+1
|
||||
#define M_PI 0x1.921fb54442d18p+1
|
||||
#define M_PI_2 0x1.921fb54442d18p+0
|
||||
#define M_PI_4 0x1.921fb54442d18p-1
|
||||
#define M_1_PI 0x1.45f306dc9c883p-2
|
||||
#define M_2_PI 0x1.45f306dc9c883p-1
|
||||
#define M_2_SQRTPI 0x1.20dd750429b6dp+0
|
||||
#define M_SQRT2 0x1.6a09e667f3bcdp+0
|
||||
#define M_SQRT1_2 0x1.6a09e667f3bcdp-1
|
||||
|
||||
#ifdef cl_khr_fp16
|
||||
|
||||
#define HALF_DIG 3
|
||||
#define HALF_MANT_DIG 11
|
||||
#define HALF_MAX_10_EXP +4
|
||||
#define HALF_MAX_EXP +16
|
||||
#define HALF_MIN_10_EXP -4
|
||||
#define HALF_MIN_EXP -13
|
||||
#define HALF_RADIX 2
|
||||
#define HALF_MAX ((0x1.ffcp15h))
|
||||
#define HALF_MIN ((0x1.0p-14h))
|
||||
#define HALF_EPSILON ((0x1.0p-10h))
|
||||
|
||||
#define M_E_H 2.71828182845904523536028747135266250h
|
||||
#define M_LOG2E_H 1.44269504088896340735992468100189214h
|
||||
#define M_LOG10E_H 0.434294481903251827651128918916605082h
|
||||
#define M_LN2_H 0.693147180559945309417232121458176568h
|
||||
#define M_LN10_H 2.30258509299404568401799145468436421h
|
||||
#define M_PI_H 3.14159265358979323846264338327950288h
|
||||
#define M_PI_2_H 1.57079632679489661923132169163975144h
|
||||
#define M_PI_4_H 0.785398163397448309615660845819875721h
|
||||
#define M_1_PI_H 0.318309886183790671537767526745028724h
|
||||
#define M_2_PI_H 0.636619772367581343075535053490057448h
|
||||
#define M_2_SQRTPI_H 1.12837916709551257389615890312154517h
|
||||
#define M_SQRT2_H 1.41421356237309504880168872420969808h
|
||||
#define M_SQRT1_2_H 0.707106781186547524400844362104849039h
|
||||
|
||||
#endif //cl_khr_fp16
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define SCHAR_MAX 127
|
||||
#define SCHAR_MIN (-128)
|
||||
#define UCHAR_MAX 255
|
||||
#define CHAR_MAX SCHAR_MAX
|
||||
#define CHAR_MIN SCHAR_MIN
|
||||
#define USHRT_MAX 65535
|
||||
#define SHRT_MAX 32767
|
||||
#define SHRT_MIN (-32768)
|
||||
#define UINT_MAX 0xffffffff
|
||||
#define INT_MAX 2147483647
|
||||
#define INT_MIN (-2147483647-1)
|
||||
#define ULONG_MAX 0xffffffffffffffffUL
|
||||
#define LONG_MAX 0x7fffffffffffffffL
|
||||
#define LONG_MIN (-0x7fffffffffffffffL-1)
|
||||
|
||||
// OpenCL v1.1 s6.11.8, v1.2 s6.12.8, v2.0 s6.13.8 - Synchronization Functions
|
||||
|
||||
// Flag type and values for barrier, mem_fence, read_mem_fence, write_mem_fence
|
||||
typedef uint cl_mem_fence_flags;
|
||||
|
||||
/**
|
||||
* Queue a memory fence to ensure correct
|
||||
* ordering of memory operations to local memory
|
||||
*/
|
||||
#define CLK_LOCAL_MEM_FENCE 0x01
|
||||
|
||||
/**
|
||||
* Queue a memory fence to ensure correct
|
||||
* ordering of memory operations to global memory
|
||||
*/
|
||||
#define CLK_GLOBAL_MEM_FENCE 0x02
|
||||
|
||||
#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
|
||||
|
||||
typedef enum memory_scope {
|
||||
memory_scope_work_item = __OPENCL_MEMORY_SCOPE_WORK_ITEM,
|
||||
memory_scope_work_group = __OPENCL_MEMORY_SCOPE_WORK_GROUP,
|
||||
memory_scope_device = __OPENCL_MEMORY_SCOPE_DEVICE,
|
||||
#if defined(__opencl_c_atomic_scope_all_devices)
|
||||
memory_scope_all_svm_devices = __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES,
|
||||
#if (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
|
||||
memory_scope_all_devices = memory_scope_all_svm_devices,
|
||||
#endif // (__OPENCL_C_VERSION__ >= CL_VERSION_3_0 || __OPENCL_CPP_VERSION__ >= 202100)
|
||||
#endif // defined(__opencl_c_atomic_scope_all_devices)
|
||||
/**
|
||||
* Subgroups have different requirements on forward progress, so just test
|
||||
* all the relevant macros.
|
||||
* CL 3.0 sub-groups "they are not guaranteed to make independent forward progress"
|
||||
* KHR subgroups "Subgroups within a workgroup are independent, make forward progress with respect to each other"
|
||||
*/
|
||||
#if defined(cl_intel_subgroups) || defined(cl_khr_subgroups) || defined(__opencl_c_subgroups)
|
||||
memory_scope_sub_group = __OPENCL_MEMORY_SCOPE_SUB_GROUP
|
||||
#endif
|
||||
} memory_scope;
|
||||
|
||||
/**
|
||||
* Queue a memory fence to ensure correct ordering of memory
|
||||
* operations between work-items of a work-group to
|
||||
* image memory.
|
||||
*/
|
||||
#define CLK_IMAGE_MEM_FENCE 0x04
|
||||
|
||||
#ifndef ATOMIC_VAR_INIT
|
||||
#define ATOMIC_VAR_INIT(x) (x)
|
||||
#endif //ATOMIC_VAR_INIT
|
||||
#define ATOMIC_FLAG_INIT 0
|
||||
|
||||
// enum values aligned with what clang uses in EmitAtomicExpr()
|
||||
typedef enum memory_order
|
||||
{
|
||||
memory_order_relaxed = __ATOMIC_RELAXED,
|
||||
memory_order_acquire = __ATOMIC_ACQUIRE,
|
||||
memory_order_release = __ATOMIC_RELEASE,
|
||||
memory_order_acq_rel = __ATOMIC_ACQ_REL,
|
||||
#if defined(__opencl_c_atomic_order_seq_cst)
|
||||
memory_order_seq_cst = __ATOMIC_SEQ_CST
|
||||
#endif
|
||||
} memory_order;
|
||||
|
||||
#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
|
||||
|
||||
// OpenCL v1.1 s6.11.3, v1.2 s6.12.14, v2.0 s6.13.14 - Image Read and Write Functions
|
||||
|
||||
// These values need to match the runtime equivalent
|
||||
//
|
||||
// Addressing Mode.
|
||||
//
|
||||
#define CLK_ADDRESS_NONE 0
|
||||
#define CLK_ADDRESS_CLAMP_TO_EDGE 2
|
||||
#define CLK_ADDRESS_CLAMP 4
|
||||
#define CLK_ADDRESS_REPEAT 6
|
||||
#define CLK_ADDRESS_MIRRORED_REPEAT 8
|
||||
|
||||
//
|
||||
// Coordination Normalization
|
||||
//
|
||||
#define CLK_NORMALIZED_COORDS_FALSE 0
|
||||
#define CLK_NORMALIZED_COORDS_TRUE 1
|
||||
|
||||
//
|
||||
// Filtering Mode.
|
||||
//
|
||||
#define CLK_FILTER_NEAREST 0x10
|
||||
#define CLK_FILTER_LINEAR 0x20
|
||||
|
||||
#ifdef cl_khr_gl_msaa_sharing
|
||||
#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable
|
||||
#endif //cl_khr_gl_msaa_sharing
|
||||
|
||||
//
|
||||
// Channel Datatype.
|
||||
//
|
||||
#define CLK_SNORM_INT8 0x10D0
|
||||
#define CLK_SNORM_INT16 0x10D1
|
||||
#define CLK_UNORM_INT8 0x10D2
|
||||
#define CLK_UNORM_INT16 0x10D3
|
||||
#define CLK_UNORM_SHORT_565 0x10D4
|
||||
#define CLK_UNORM_SHORT_555 0x10D5
|
||||
#define CLK_UNORM_INT_101010 0x10D6
|
||||
#define CLK_SIGNED_INT8 0x10D7
|
||||
#define CLK_SIGNED_INT16 0x10D8
|
||||
#define CLK_SIGNED_INT32 0x10D9
|
||||
#define CLK_UNSIGNED_INT8 0x10DA
|
||||
#define CLK_UNSIGNED_INT16 0x10DB
|
||||
#define CLK_UNSIGNED_INT32 0x10DC
|
||||
#define CLK_HALF_FLOAT 0x10DD
|
||||
#define CLK_FLOAT 0x10DE
|
||||
#define CLK_UNORM_INT24 0x10DF
|
||||
#if __OPENCL_C_VERSION__ >= CL_VERSION_3_0
|
||||
#define CLK_UNORM_INT_101010_2 0x10E0
|
||||
#endif // __OPENCL_C_VERSION__ >= CL_VERSION_3_0
|
||||
|
||||
// Channel order, numbering must be aligned with cl_channel_order in cl.h
|
||||
//
|
||||
#define CLK_R 0x10B0
|
||||
#define CLK_A 0x10B1
|
||||
#define CLK_RG 0x10B2
|
||||
#define CLK_RA 0x10B3
|
||||
#define CLK_RGB 0x10B4
|
||||
#define CLK_RGBA 0x10B5
|
||||
#define CLK_BGRA 0x10B6
|
||||
#define CLK_ARGB 0x10B7
|
||||
#define CLK_INTENSITY 0x10B8
|
||||
#define CLK_LUMINANCE 0x10B9
|
||||
#define CLK_Rx 0x10BA
|
||||
#define CLK_RGx 0x10BB
|
||||
#define CLK_RGBx 0x10BC
|
||||
#define CLK_DEPTH 0x10BD
|
||||
#define CLK_DEPTH_STENCIL 0x10BE
|
||||
#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
|
||||
#define CLK_sRGB 0x10BF
|
||||
#define CLK_sRGBx 0x10C0
|
||||
#define CLK_sRGBA 0x10C1
|
||||
#define CLK_sBGRA 0x10C2
|
||||
#define CLK_ABGR 0x10C3
|
||||
#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
|
||||
|
||||
// OpenCL v2.0 s6.13.16 - Pipe Functions
|
||||
#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
|
||||
#define CLK_NULL_RESERVE_ID (__builtin_astype(((void*)(__SIZE_MAX__)), reserve_id_t))
|
||||
|
||||
// OpenCL v2.0 s6.13.17 - Enqueue Kernels
|
||||
#define CL_COMPLETE 0x0
|
||||
#define CL_RUNNING 0x1
|
||||
#define CL_SUBMITTED 0x2
|
||||
#define CL_QUEUED 0x3
|
||||
|
||||
#define CLK_SUCCESS 0
|
||||
#define CLK_ENQUEUE_FAILURE -101
|
||||
#define CLK_INVALID_QUEUE -102
|
||||
#define CLK_INVALID_NDRANGE -160
|
||||
#define CLK_INVALID_EVENT_WAIT_LIST -57
|
||||
#define CLK_DEVICE_QUEUE_FULL -161
|
||||
#define CLK_INVALID_ARG_SIZE -51
|
||||
#define CLK_EVENT_ALLOCATION_FAILURE -100
|
||||
#define CLK_OUT_OF_RESOURCES -5
|
||||
|
||||
#define CLK_NULL_QUEUE 0
|
||||
#define CLK_NULL_EVENT (__builtin_astype(((__SIZE_MAX__)), clk_event_t))
|
||||
|
||||
// execution model related definitions
|
||||
#define CLK_ENQUEUE_FLAGS_NO_WAIT 0x0
|
||||
#define CLK_ENQUEUE_FLAGS_WAIT_KERNEL 0x1
|
||||
#define CLK_ENQUEUE_FLAGS_WAIT_WORK_GROUP 0x2
|
||||
|
||||
typedef int kernel_enqueue_flags_t;
|
||||
typedef int clk_profiling_info;
|
||||
|
||||
// Profiling info name (see capture_event_profiling_info)
|
||||
#define CLK_PROFILING_COMMAND_EXEC_TIME 0x1
|
||||
|
||||
#define MAX_WORK_DIM 3
|
||||
|
||||
#ifdef __opencl_c_device_enqueue
|
||||
typedef struct {
|
||||
unsigned int workDimension;
|
||||
size_t globalWorkOffset[MAX_WORK_DIM];
|
||||
size_t globalWorkSize[MAX_WORK_DIM];
|
||||
size_t localWorkSize[MAX_WORK_DIM];
|
||||
} ndrange_t;
|
||||
#endif // __opencl_c_device_enqueue
|
||||
|
||||
#endif // defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
|
||||
|
||||
/**
|
||||
* OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators
|
||||
* Reinterprets a data type as another data type of the same size
|
||||
*/
|
||||
#define as_char(x) __builtin_astype((x), char)
|
||||
#define as_char2(x) __builtin_astype((x), char2)
|
||||
#define as_char3(x) __builtin_astype((x), char3)
|
||||
#define as_char4(x) __builtin_astype((x), char4)
|
||||
#define as_char8(x) __builtin_astype((x), char8)
|
||||
#define as_char16(x) __builtin_astype((x), char16)
|
||||
|
||||
#define as_uchar(x) __builtin_astype((x), uchar)
|
||||
#define as_uchar2(x) __builtin_astype((x), uchar2)
|
||||
#define as_uchar3(x) __builtin_astype((x), uchar3)
|
||||
#define as_uchar4(x) __builtin_astype((x), uchar4)
|
||||
#define as_uchar8(x) __builtin_astype((x), uchar8)
|
||||
#define as_uchar16(x) __builtin_astype((x), uchar16)
|
||||
|
||||
#define as_short(x) __builtin_astype((x), short)
|
||||
#define as_short2(x) __builtin_astype((x), short2)
|
||||
#define as_short3(x) __builtin_astype((x), short3)
|
||||
#define as_short4(x) __builtin_astype((x), short4)
|
||||
#define as_short8(x) __builtin_astype((x), short8)
|
||||
#define as_short16(x) __builtin_astype((x), short16)
|
||||
|
||||
#define as_ushort(x) __builtin_astype((x), ushort)
|
||||
#define as_ushort2(x) __builtin_astype((x), ushort2)
|
||||
#define as_ushort3(x) __builtin_astype((x), ushort3)
|
||||
#define as_ushort4(x) __builtin_astype((x), ushort4)
|
||||
#define as_ushort8(x) __builtin_astype((x), ushort8)
|
||||
#define as_ushort16(x) __builtin_astype((x), ushort16)
|
||||
|
||||
#define as_int(x) __builtin_astype((x), int)
|
||||
#define as_int2(x) __builtin_astype((x), int2)
|
||||
#define as_int3(x) __builtin_astype((x), int3)
|
||||
#define as_int4(x) __builtin_astype((x), int4)
|
||||
#define as_int8(x) __builtin_astype((x), int8)
|
||||
#define as_int16(x) __builtin_astype((x), int16)
|
||||
|
||||
#define as_uint(x) __builtin_astype((x), uint)
|
||||
#define as_uint2(x) __builtin_astype((x), uint2)
|
||||
#define as_uint3(x) __builtin_astype((x), uint3)
|
||||
#define as_uint4(x) __builtin_astype((x), uint4)
|
||||
#define as_uint8(x) __builtin_astype((x), uint8)
|
||||
#define as_uint16(x) __builtin_astype((x), uint16)
|
||||
|
||||
#define as_long(x) __builtin_astype((x), long)
|
||||
#define as_long2(x) __builtin_astype((x), long2)
|
||||
#define as_long3(x) __builtin_astype((x), long3)
|
||||
#define as_long4(x) __builtin_astype((x), long4)
|
||||
#define as_long8(x) __builtin_astype((x), long8)
|
||||
#define as_long16(x) __builtin_astype((x), long16)
|
||||
|
||||
#define as_ulong(x) __builtin_astype((x), ulong)
|
||||
#define as_ulong2(x) __builtin_astype((x), ulong2)
|
||||
#define as_ulong3(x) __builtin_astype((x), ulong3)
|
||||
#define as_ulong4(x) __builtin_astype((x), ulong4)
|
||||
#define as_ulong8(x) __builtin_astype((x), ulong8)
|
||||
#define as_ulong16(x) __builtin_astype((x), ulong16)
|
||||
|
||||
#define as_float(x) __builtin_astype((x), float)
|
||||
#define as_float2(x) __builtin_astype((x), float2)
|
||||
#define as_float3(x) __builtin_astype((x), float3)
|
||||
#define as_float4(x) __builtin_astype((x), float4)
|
||||
#define as_float8(x) __builtin_astype((x), float8)
|
||||
#define as_float16(x) __builtin_astype((x), float16)
|
||||
|
||||
#ifdef cl_khr_fp64
|
||||
#define as_double(x) __builtin_astype((x), double)
|
||||
#define as_double2(x) __builtin_astype((x), double2)
|
||||
#define as_double3(x) __builtin_astype((x), double3)
|
||||
#define as_double4(x) __builtin_astype((x), double4)
|
||||
#define as_double8(x) __builtin_astype((x), double8)
|
||||
#define as_double16(x) __builtin_astype((x), double16)
|
||||
#endif // cl_khr_fp64
|
||||
|
||||
#ifdef cl_khr_fp16
|
||||
#define as_half(x) __builtin_astype((x), half)
|
||||
#define as_half2(x) __builtin_astype((x), half2)
|
||||
#define as_half3(x) __builtin_astype((x), half3)
|
||||
#define as_half4(x) __builtin_astype((x), half4)
|
||||
#define as_half8(x) __builtin_astype((x), half8)
|
||||
#define as_half16(x) __builtin_astype((x), half16)
|
||||
#endif // cl_khr_fp16
|
||||
|
||||
#define as_size_t(x) __builtin_astype((x), size_t)
|
||||
#define as_ptrdiff_t(x) __builtin_astype((x), ptrdiff_t)
|
||||
#define as_intptr_t(x) __builtin_astype((x), intptr_t)
|
||||
#define as_uintptr_t(x) __builtin_astype((x), uintptr_t)
|
||||
|
||||
// C++ for OpenCL - __remove_address_space
|
||||
#if defined(__OPENCL_CPP_VERSION__)
|
||||
template <typename _Tp> struct __remove_address_space { using type = _Tp; };
|
||||
#if defined(__opencl_c_generic_address_space)
|
||||
template <typename _Tp> struct __remove_address_space<__generic _Tp> {
|
||||
using type = _Tp;
|
||||
};
|
||||
#endif
|
||||
template <typename _Tp> struct __remove_address_space<__global _Tp> {
|
||||
using type = _Tp;
|
||||
};
|
||||
template <typename _Tp> struct __remove_address_space<__private _Tp> {
|
||||
using type = _Tp;
|
||||
};
|
||||
template <typename _Tp> struct __remove_address_space<__local _Tp> {
|
||||
using type = _Tp;
|
||||
};
|
||||
template <typename _Tp> struct __remove_address_space<__constant _Tp> {
|
||||
using type = _Tp;
|
||||
};
|
||||
#endif
|
||||
|
||||
// OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers
|
||||
|
||||
#define __kernel_exec(X, typen) __kernel \
|
||||
__attribute__((work_group_size_hint(X, 1, 1))) \
|
||||
__attribute__((vec_type_hint(typen)))
|
||||
|
||||
#define kernel_exec(X, typen) __kernel \
|
||||
__attribute__((work_group_size_hint(X, 1, 1))) \
|
||||
__attribute__((vec_type_hint(typen)))
|
||||
|
||||
#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_1_2)
|
||||
// OpenCL v1.2 s6.12.13, v2.0 s6.13.13 - printf
|
||||
|
||||
int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2)));
|
||||
#endif
|
||||
|
||||
#ifdef cl_intel_device_side_avc_motion_estimation
|
||||
|
||||
#define CLK_AVC_ME_MAJOR_16x16_INTEL 0x0
|
||||
#define CLK_AVC_ME_MAJOR_16x8_INTEL 0x1
|
||||
#define CLK_AVC_ME_MAJOR_8x16_INTEL 0x2
|
||||
#define CLK_AVC_ME_MAJOR_8x8_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_MINOR_8x8_INTEL 0x0
|
||||
#define CLK_AVC_ME_MINOR_8x4_INTEL 0x1
|
||||
#define CLK_AVC_ME_MINOR_4x8_INTEL 0x2
|
||||
#define CLK_AVC_ME_MINOR_4x4_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_MAJOR_FORWARD_INTEL 0x0
|
||||
#define CLK_AVC_ME_MAJOR_BACKWARD_INTEL 0x1
|
||||
#define CLK_AVC_ME_MAJOR_BIDIRECTIONAL_INTEL 0x2
|
||||
|
||||
#define CLK_AVC_ME_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CLK_AVC_ME_PARTITION_MASK_16x16_INTEL 0x7E
|
||||
#define CLK_AVC_ME_PARTITION_MASK_16x8_INTEL 0x7D
|
||||
#define CLK_AVC_ME_PARTITION_MASK_8x16_INTEL 0x7B
|
||||
#define CLK_AVC_ME_PARTITION_MASK_8x8_INTEL 0x77
|
||||
#define CLK_AVC_ME_PARTITION_MASK_8x4_INTEL 0x6F
|
||||
#define CLK_AVC_ME_PARTITION_MASK_4x8_INTEL 0x5F
|
||||
#define CLK_AVC_ME_PARTITION_MASK_4x4_INTEL 0x3F
|
||||
|
||||
#define CLK_AVC_ME_SLICE_TYPE_PRED_INTEL 0x0
|
||||
#define CLK_AVC_ME_SLICE_TYPE_BPRED_INTEL 0x1
|
||||
#define CLK_AVC_ME_SLICE_TYPE_INTRA_INTEL 0x2
|
||||
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_EXHAUSTIVE_INTEL 0x0
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_SMALL_INTEL 0x1
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_TINY_INTEL 0x2
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_EXTRA_TINY_INTEL 0x3
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_DIAMOND_INTEL 0x4
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_LARGE_DIAMOND_INTEL 0x5
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_RESERVED0_INTEL 0x6
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_RESERVED1_INTEL 0x7
|
||||
#define CLK_AVC_ME_SEARCH_WINDOW_CUSTOM_INTEL 0x8
|
||||
|
||||
#define CLK_AVC_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
|
||||
#define CLK_AVC_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x2
|
||||
|
||||
#define CLK_AVC_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
|
||||
#define CLK_AVC_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
|
||||
#define CLK_AVC_ME_SUBPIXEL_MODE_QPEL_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_COST_PRECISION_QPEL_INTEL 0x0
|
||||
#define CLK_AVC_ME_COST_PRECISION_HPEL_INTEL 0x1
|
||||
#define CLK_AVC_ME_COST_PRECISION_PEL_INTEL 0x2
|
||||
#define CLK_AVC_ME_COST_PRECISION_DPEL_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_BIDIR_WEIGHT_QUARTER_INTEL 0x10
|
||||
#define CLK_AVC_ME_BIDIR_WEIGHT_THIRD_INTEL 0x15
|
||||
#define CLK_AVC_ME_BIDIR_WEIGHT_HALF_INTEL 0x20
|
||||
#define CLK_AVC_ME_BIDIR_WEIGHT_TWO_THIRD_INTEL 0x2B
|
||||
#define CLK_AVC_ME_BIDIR_WEIGHT_THREE_QUARTER_INTEL 0x30
|
||||
|
||||
#define CLK_AVC_ME_BORDER_REACHED_LEFT_INTEL 0x0
|
||||
#define CLK_AVC_ME_BORDER_REACHED_RIGHT_INTEL 0x2
|
||||
#define CLK_AVC_ME_BORDER_REACHED_TOP_INTEL 0x4
|
||||
#define CLK_AVC_ME_BORDER_REACHED_BOTTOM_INTEL 0x8
|
||||
|
||||
#define CLK_AVC_ME_INTRA_16x16_INTEL 0x0
|
||||
#define CLK_AVC_ME_INTRA_8x8_INTEL 0x1
|
||||
#define CLK_AVC_ME_INTRA_4x4_INTEL 0x2
|
||||
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_PARTITION_16x16_INTEL 0x0
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_PARTITION_8x8_INTEL 0x4000
|
||||
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_16x16_FORWARD_ENABLE_INTEL (0x1 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_16x16_BACKWARD_ENABLE_INTEL (0x2 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_16x16_DUAL_ENABLE_INTEL (0x3 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_FORWARD_ENABLE_INTEL (0x55 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_BACKWARD_ENABLE_INTEL (0xAA << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_DUAL_ENABLE_INTEL (0xFF << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_0_FORWARD_ENABLE_INTEL (0x1 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_0_BACKWARD_ENABLE_INTEL (0x2 << 24)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_1_FORWARD_ENABLE_INTEL (0x1 << 26)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_1_BACKWARD_ENABLE_INTEL (0x2 << 26)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_2_FORWARD_ENABLE_INTEL (0x1 << 28)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_2_BACKWARD_ENABLE_INTEL (0x2 << 28)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_3_FORWARD_ENABLE_INTEL (0x1 << 30)
|
||||
#define CLK_AVC_ME_SKIP_BLOCK_8x8_3_BACKWARD_ENABLE_INTEL (0x2 << 30)
|
||||
|
||||
#define CLK_AVC_ME_BLOCK_BASED_SKIP_4x4_INTEL 0x00
|
||||
#define CLK_AVC_ME_BLOCK_BASED_SKIP_8x8_INTEL 0x80
|
||||
|
||||
#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_ALL_INTEL 0x0
|
||||
#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_16x16_INTEL 0x6
|
||||
#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_8x8_INTEL 0x5
|
||||
#define CLK_AVC_ME_INTRA_LUMA_PARTITION_MASK_4x4_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_INTRA_NEIGHBOR_LEFT_MASK_ENABLE_INTEL 0x60
|
||||
#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_MASK_ENABLE_INTEL 0x10
|
||||
#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_RIGHT_MASK_ENABLE_INTEL 0x8
|
||||
#define CLK_AVC_ME_INTRA_NEIGHBOR_UPPER_LEFT_MASK_ENABLE_INTEL 0x4
|
||||
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_INTEL 0x0
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DC_INTEL 0x2
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_LEFT_INTEL 0x3
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_DIAGONAL_DOWN_RIGHT_INTEL 0x4
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_PLANE_INTEL 0x4
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_RIGHT_INTEL 0x5
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_DOWN_INTEL 0x6
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_VERTICAL_LEFT_INTEL 0x7
|
||||
#define CLK_AVC_ME_LUMA_PREDICTOR_MODE_HORIZONTAL_UP_INTEL 0x8
|
||||
#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_DC_INTEL 0x0
|
||||
#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_HORIZONTAL_INTEL 0x1
|
||||
#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_VERTICAL_INTEL 0x2
|
||||
#define CLK_AVC_ME_CHROMA_PREDICTOR_MODE_PLANE_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_FRAME_FORWARD_INTEL 0x1
|
||||
#define CLK_AVC_ME_FRAME_BACKWARD_INTEL 0x2
|
||||
#define CLK_AVC_ME_FRAME_DUAL_INTEL 0x3
|
||||
|
||||
#define CLK_AVC_ME_INTERLACED_SCAN_TOP_FIELD_INTEL 0x0
|
||||
#define CLK_AVC_ME_INTERLACED_SCAN_BOTTOM_FIELD_INTEL 0x1
|
||||
|
||||
#define CLK_AVC_ME_INITIALIZE_INTEL 0x0
|
||||
|
||||
#define CLK_AVC_IME_PAYLOAD_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_REF_PAYLOAD_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_SIC_PAYLOAD_INITIALIZE_INTEL 0x0
|
||||
|
||||
#define CLK_AVC_IME_RESULT_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_REF_RESULT_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_SIC_RESULT_INITIALIZE_INTEL 0x0
|
||||
|
||||
#define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_IME_RESULT_SINGLE_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMOUT_INITIALIZE_INTEL 0x0
|
||||
#define CLK_AVC_IME_RESULT_DUAL_REFERENCE_STREAMIN_INITIALIZE_INTEL 0x0
|
||||
|
||||
#endif // cl_intel_device_side_avc_motion_estimation
|
||||
|
||||
// Disable any extensions we may have enabled previously.
|
||||
#pragma OPENCL EXTENSION all : disable
|
||||
|
||||
#endif //_OPENCL_BASE_H_
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,617 +0,0 @@
|
||||
/* pocl.h - global pocl declarations for the host side runtime.
|
||||
|
||||
Copyright (c) 2011 Universidad Rey Juan Carlos
|
||||
2011-2019 Pekka Jääskeläinen
|
||||
2024 Pekka Jääskeläinen / Intel Finland Oy
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file pocl.h
|
||||
*
|
||||
* The declarations in this file are such that are used both in the
|
||||
* libpocl implementation CL and the kernel compiler. Others should be
|
||||
* moved to pocl_cl.h of lib/CL or under the kernel compiler dir.
|
||||
* @todo Check if there are extra declarations here that could be moved.
|
||||
*/
|
||||
#ifndef POCL_H
|
||||
#define POCL_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* The running number used for identifying PoCL runtime allocated objects.
|
||||
0 marks an invalid/undefined object. */
|
||||
typedef uint64_t pocl_obj_id_t;
|
||||
|
||||
#if defined(EXPORT_POCL_LIB) && defined(_MSC_VER)
|
||||
/* To successfully export OpenCL API, the dllexport must be placed on
|
||||
* both the declaration and the definition as MSVC requires that both
|
||||
* of them have the same attributes.
|
||||
*
|
||||
* NOTE: Trouble is expected if CL/opencl.h is not included for the
|
||||
* first time here.
|
||||
*/
|
||||
#undef CL_API_ENTRY
|
||||
#define CL_API_ENTRY __declspec(dllexport)
|
||||
#endif
|
||||
|
||||
#ifndef CL_TARGET_OPENCL_VERSION
|
||||
#define CL_TARGET_OPENCL_VERSION 300
|
||||
#endif
|
||||
#include <CL/opencl.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "pocl_export.h"
|
||||
|
||||
#include "pocl_context.h"
|
||||
|
||||
#include "vccompat.hpp"
|
||||
|
||||
/* The maximum file, directory and path name lengths.
|
||||
NOTE: GDB seems to fail to load symbols from .so files which have
|
||||
longer pathnames than 511, thus the quite small dir/filename length
|
||||
limiter. */
|
||||
#define POCL_MAX_DIRNAME_LENGTH 64
|
||||
#define POCL_MAX_FILENAME_LENGTH (POCL_MAX_DIRNAME_LENGTH)
|
||||
/* -5: Leave space for .so and for additional .o if temp file debugging
|
||||
is enabled. */
|
||||
#define POCL_HASH_FILENAME_LENGTH (POCL_MAX_DIRNAME_LENGTH - 5)
|
||||
#define POCL_MAX_PATHNAME_LENGTH 4096
|
||||
|
||||
/* official Khronos ID */
|
||||
#ifndef CL_KHRONOS_VENDOR_ID_POCL
|
||||
#define CL_KHRONOS_VENDOR_ID_POCL 0x10006
|
||||
#endif
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
# define POCL_ALIGNAS(x) alignas(x)
|
||||
#elif __STDC_VERSION__ >= 201112L /* C11 */
|
||||
# define POCL_ALIGNAS(x) _Alignas(x)
|
||||
#elif defined(_MSC_VER)
|
||||
# define POCL_ALIGNAS(x) __declspec(align(x))
|
||||
#elif defined(__clang__) || defined(__GNUC__)
|
||||
# define POCL_ALIGNAS(x) __attribute__ ((aligned (x)))
|
||||
#else
|
||||
/* Emit an error for potential correctness issues if alignas() is ignored. */
|
||||
# error "Don't know alignas() counterpart for this compiler!"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#define POCL_PATH_SEPARATOR "/"
|
||||
#else
|
||||
#define POCL_PATH_SEPARATOR "\\"
|
||||
#endif
|
||||
|
||||
/* Always align buffer allocations, context data, and kernel arguments to
|
||||
sizeof(double16) to enforce easier vectorization for targets with naturally
|
||||
aligned loads/stores. */
|
||||
#define MAX_EXTENDED_ALIGNMENT 128
|
||||
|
||||
/* represents a single buffer to host memory mapping */
|
||||
typedef struct mem_mapping
|
||||
{
|
||||
void *host_ptr; /* the location of the mapped buffer chunk in the host memory
|
||||
*/
|
||||
size_t offset; /* offset to the beginning of the buffer */
|
||||
size_t size;
|
||||
struct mem_mapping *prev, *next;
|
||||
|
||||
/* This is required, because two clEnqueueMap() with the same
|
||||
buffer+size+offset, will create two identical mappings in the
|
||||
buffer->mappings LL. Without this flag, both corresponding clEnqUnmap()s
|
||||
will find the same mapping (the first one in mappings LL), which will lead
|
||||
to memory double-free corruption later. */
|
||||
int unmap_requested;
|
||||
|
||||
cl_map_flags map_flags;
|
||||
/* image mapping data */
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t row_pitch;
|
||||
size_t slice_pitch;
|
||||
} mem_mapping_t;
|
||||
|
||||
/* A single buffer can and will be allocated in
|
||||
multiple different devices which might or might not share the global memory.
|
||||
This struct captures a single buffer to global memory allocation's
|
||||
properties.
|
||||
*/
|
||||
typedef struct pocl_mem_identifier
|
||||
{
|
||||
/* Global-memory-specific pointer to hardware resource that represents
|
||||
memory. This may be anything, but must be non-NULL while the memory is
|
||||
actually allocated, and NULL when it's not */
|
||||
void *mem_ptr;
|
||||
|
||||
/* If mem_ptr represents an address in the device global memory which
|
||||
is pinned for the lifetime of the buffer. */
|
||||
int is_pinned;
|
||||
|
||||
/* The device-side memory address (if known). If is_pinned is true, this
|
||||
must be a valid value (note: 0 means invalid address). */
|
||||
void *device_addr;
|
||||
|
||||
/* Content version tracking. Every write use (clEnqWriteBuffer,
|
||||
* clMapBuffer(CL_MAP_WRITE), write_only image, read/write buffers as kernel
|
||||
* args etc) increases the version; read uses do not. This version is used in
|
||||
* implicit migrations to find the latest copy of the data.
|
||||
*
|
||||
* In theory, a simple bool of "valid/invalid" could be used;
|
||||
* the only difference is that a version numbering scheme saves history,
|
||||
* which could be useful for LRU global memory garbage collection among other
|
||||
* things in the future.
|
||||
*/
|
||||
uint64_t version;
|
||||
|
||||
/* Extra pointer for drivers to use for anything.
|
||||
*
|
||||
* Currently CUDA uses it to track ALLOC_HOST_PTR allocations.
|
||||
* Vulkan uses it to store host-mapped staging memory.
|
||||
*/
|
||||
void *extra_ptr;
|
||||
|
||||
/* Extra integer for drivers to use for anything.
|
||||
*
|
||||
* Currently Vulkan uses it to track vulkan memory requirements.
|
||||
*/
|
||||
uint64_t extra;
|
||||
|
||||
} pocl_mem_identifier;
|
||||
|
||||
typedef char pixel_t[16];
|
||||
|
||||
typedef struct _mem_destructor_callback mem_destructor_callback_t;
|
||||
/* represents a memory object destructor callback */
|
||||
struct _mem_destructor_callback
|
||||
{
|
||||
void (CL_CALLBACK * pfn_notify) (cl_mem, void*); /* callback function */
|
||||
void *user_data; /* user supplied data passed to callback function */
|
||||
mem_destructor_callback_t *next;
|
||||
};
|
||||
|
||||
typedef struct _build_program_callback build_program_callback_t;
|
||||
struct _build_program_callback
|
||||
{
|
||||
void (CL_CALLBACK * callback_function) (cl_program, void*); /* callback function */
|
||||
void *user_data; /* user supplied data passed to callback function */
|
||||
};
|
||||
|
||||
// same as SHA1_DIGEST_SIZE
|
||||
#define POCL_KERNEL_DIGEST_SIZE 20
|
||||
typedef uint8_t pocl_kernel_hash_t[POCL_KERNEL_DIGEST_SIZE];
|
||||
|
||||
/* For clEnqueueNDRangeKernel(). */
|
||||
typedef struct
|
||||
{
|
||||
void *hash;
|
||||
void *wg; /* The work group function ptr. Device specific. */
|
||||
cl_kernel kernel;
|
||||
/* The launch data that can be passed to the kernel execution environment. */
|
||||
struct pocl_context pc;
|
||||
struct pocl_argument *arguments;
|
||||
/* Can be used to store/cache arbitrary device-specific data. */
|
||||
void *device_data;
|
||||
/* If set to 1, disallow any work-group function specialization. */
|
||||
int force_generic_wg_func;
|
||||
/* If set to 1, disallow "small grid" WG function specialization. */
|
||||
int force_large_grid_wg_func;
|
||||
} _cl_command_run;
|
||||
|
||||
/* For clEnqueueCommandBufferKHR(). */
|
||||
typedef struct
|
||||
{
|
||||
cl_command_buffer_khr buffer;
|
||||
} _cl_command_replay;
|
||||
|
||||
/* For clEnqueueNativeKernel(). */
|
||||
typedef struct
|
||||
{
|
||||
void *args;
|
||||
size_t cb_args;
|
||||
/* The argument buffers are stored in _cl_command's migr_info list. */
|
||||
void **arg_locs;
|
||||
void(CL_CALLBACK *user_func) (void *);
|
||||
} _cl_command_native;
|
||||
|
||||
/* For clEnqueueReadBuffer(). */
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ dst_host_ptr;
|
||||
pocl_mem_identifier *src_content_size_mem_id;
|
||||
size_t offset;
|
||||
size_t size;
|
||||
size_t *content_size;
|
||||
cl_mem src;
|
||||
} _cl_command_read;
|
||||
|
||||
/* For clEnqueueWriteBuffer(). */
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src_host_ptr;
|
||||
size_t offset;
|
||||
size_t size;
|
||||
cl_mem dst;
|
||||
} _cl_command_write;
|
||||
|
||||
/* For clEnqueueCopyBuffer(). */
|
||||
typedef struct
|
||||
{
|
||||
pocl_mem_identifier *src_content_size_mem_id;
|
||||
cl_mem src;
|
||||
cl_mem src_content_size;
|
||||
cl_mem dst;
|
||||
size_t src_offset;
|
||||
size_t dst_offset;
|
||||
size_t size;
|
||||
} _cl_command_copy;
|
||||
|
||||
/* For clEnqueueReadBufferRect(). */
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ dst_host_ptr;
|
||||
size_t buffer_origin[3];
|
||||
size_t host_origin[3];
|
||||
size_t region[3];
|
||||
size_t buffer_row_pitch;
|
||||
size_t buffer_slice_pitch;
|
||||
size_t host_row_pitch;
|
||||
size_t host_slice_pitch;
|
||||
cl_mem src;
|
||||
} _cl_command_read_rect;
|
||||
|
||||
/* For clEnqueueWriteBufferRect(). */
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src_host_ptr;
|
||||
size_t buffer_origin[3];
|
||||
size_t host_origin[3];
|
||||
size_t region[3];
|
||||
size_t buffer_row_pitch;
|
||||
size_t buffer_slice_pitch;
|
||||
size_t host_row_pitch;
|
||||
size_t host_slice_pitch;
|
||||
cl_mem dst;
|
||||
} _cl_command_write_rect;
|
||||
|
||||
/* For clEnqueueCopyBufferRect(). */
|
||||
typedef struct
|
||||
{
|
||||
cl_mem src;
|
||||
cl_mem dst;
|
||||
size_t dst_origin[3];
|
||||
size_t src_origin[3];
|
||||
size_t region[3];
|
||||
size_t src_row_pitch;
|
||||
size_t src_slice_pitch;
|
||||
size_t dst_row_pitch;
|
||||
size_t dst_slice_pitch;
|
||||
} _cl_command_copy_rect;
|
||||
|
||||
/* For clEnqueueMapBuffer(). */
|
||||
typedef struct
|
||||
{
|
||||
mem_mapping_t *mapping;
|
||||
cl_mem buffer;
|
||||
} _cl_command_map;
|
||||
|
||||
/* For clEnqueueUnMapMemObject(). */
|
||||
typedef struct
|
||||
{
|
||||
mem_mapping_t *mapping;
|
||||
cl_mem buffer;
|
||||
} _cl_command_unmap;
|
||||
|
||||
/* For clEnqueueFillBuffer(). */
|
||||
typedef struct
|
||||
{
|
||||
size_t size;
|
||||
size_t offset;
|
||||
void *__restrict__ pattern;
|
||||
size_t pattern_size;
|
||||
cl_mem dst;
|
||||
} _cl_command_fill_mem;
|
||||
|
||||
/* For clEnqueue(Write/Read)Image(). */
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ dst_host_ptr;
|
||||
cl_mem src;
|
||||
cl_mem dst;
|
||||
size_t dst_offset;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t dst_row_pitch;
|
||||
size_t dst_slice_pitch;
|
||||
} _cl_command_read_image;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src_host_ptr;
|
||||
cl_mem src;
|
||||
cl_mem dst;
|
||||
size_t src_offset;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
size_t src_row_pitch;
|
||||
size_t src_slice_pitch;
|
||||
} _cl_command_write_image;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
cl_mem src;
|
||||
cl_mem dst;
|
||||
size_t dst_origin[3];
|
||||
size_t src_origin[3];
|
||||
size_t region[3];
|
||||
} _cl_command_copy_image;
|
||||
|
||||
/* For clEnqueueFillImage(). */
|
||||
typedef struct
|
||||
{
|
||||
pixel_t fill_pixel;
|
||||
cl_uint4 orig_pixel;
|
||||
size_t pixel_size;
|
||||
size_t origin[3];
|
||||
size_t region[3];
|
||||
cl_mem dst;
|
||||
} _cl_command_fill_image;
|
||||
|
||||
/* For clEnqueueMarkerWithWaitlist(). */
|
||||
typedef struct
|
||||
{
|
||||
void *data;
|
||||
int has_wait_list;
|
||||
} _cl_command_marker;
|
||||
|
||||
/* For clEnqueueBarrierWithWaitlist(). */
|
||||
typedef _cl_command_marker _cl_command_barrier;
|
||||
|
||||
typedef enum pocl_migration_type_e {
|
||||
ENQUEUE_MIGRATE_TYPE_NOP,
|
||||
ENQUEUE_MIGRATE_TYPE_D2H,
|
||||
ENQUEUE_MIGRATE_TYPE_H2D,
|
||||
ENQUEUE_MIGRATE_TYPE_D2D
|
||||
} pocl_migration_type_t;
|
||||
|
||||
/* For clEnqueueMigrateMemObjects(). */
|
||||
typedef struct
|
||||
{
|
||||
pocl_migration_type_t type;
|
||||
cl_device_id src_device;
|
||||
/** For migrating a buffer that has a size buffer as per
|
||||
* cl_pocl_content_size */
|
||||
uint64_t migration_size;
|
||||
pocl_mem_identifier *src_content_size_mem_id;
|
||||
/* Number of buffers to migrate. The actual buffers are in migr_info in
|
||||
the _cl_command_node. */
|
||||
size_t num_buffers;
|
||||
/* Set to 1 if this is a migration command generated by the runtime to
|
||||
ensure coherence for the input buffers of commands. */
|
||||
char implicit;
|
||||
} _cl_command_migrate;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* data;
|
||||
cl_command_queue queue;
|
||||
unsigned num_svm_pointers;
|
||||
void **svm_pointers;
|
||||
void (CL_CALLBACK *pfn_free_func) ( cl_command_queue queue,
|
||||
unsigned num_svm_pointers,
|
||||
void *svm_pointers[],
|
||||
void *user_data);
|
||||
} _cl_command_svm_free;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned num_svm_pointers;
|
||||
size_t *sizes;
|
||||
void **svm_pointers;
|
||||
} _cl_command_svm_migrate;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* svm_ptr;
|
||||
size_t size;
|
||||
cl_map_flags flags;
|
||||
} _cl_command_svm_map;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void* svm_ptr;
|
||||
size_t size;
|
||||
} _cl_command_svm_unmap;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src;
|
||||
void *__restrict__ dst;
|
||||
size_t size;
|
||||
} _cl_command_svm_cpy;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *__restrict__ src;
|
||||
void *__restrict__ dst;
|
||||
size_t region[3];
|
||||
size_t src_origin[3];
|
||||
size_t dst_origin[3];
|
||||
size_t src_row_pitch;
|
||||
size_t src_slice_pitch;
|
||||
size_t dst_row_pitch;
|
||||
size_t dst_slice_pitch;
|
||||
} _cl_command_svm_cpy_rect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ svm_ptr;
|
||||
size_t size;
|
||||
void *__restrict__ pattern;
|
||||
size_t pattern_size;
|
||||
} _cl_command_svm_fill;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void *__restrict__ svm_ptr;
|
||||
void *__restrict__ pattern;
|
||||
size_t region[3];
|
||||
size_t origin[3];
|
||||
size_t row_pitch;
|
||||
size_t slice_pitch;
|
||||
size_t pattern_size;
|
||||
} _cl_command_svm_fill_rect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const void *ptr;
|
||||
size_t size;
|
||||
cl_mem_advice_intel advice;
|
||||
} _cl_command_svm_memadvise;
|
||||
|
||||
typedef union
|
||||
{
|
||||
_cl_command_run run;
|
||||
_cl_command_native native;
|
||||
_cl_command_replay replay;
|
||||
|
||||
_cl_command_read read;
|
||||
_cl_command_write write;
|
||||
_cl_command_copy copy;
|
||||
_cl_command_read_rect read_rect;
|
||||
_cl_command_write_rect write_rect;
|
||||
_cl_command_copy_rect copy_rect;
|
||||
_cl_command_fill_mem memfill;
|
||||
|
||||
_cl_command_read_image read_image;
|
||||
_cl_command_write_image write_image;
|
||||
_cl_command_copy_image copy_image;
|
||||
_cl_command_fill_image fill_image;
|
||||
|
||||
_cl_command_map map;
|
||||
_cl_command_unmap unmap;
|
||||
|
||||
_cl_command_marker marker;
|
||||
_cl_command_barrier barrier;
|
||||
_cl_command_migrate migrate;
|
||||
|
||||
_cl_command_svm_free svm_free;
|
||||
_cl_command_svm_map svm_map;
|
||||
_cl_command_svm_unmap svm_unmap;
|
||||
_cl_command_svm_cpy svm_memcpy;
|
||||
_cl_command_svm_cpy_rect svm_memcpy_rect;
|
||||
_cl_command_svm_fill svm_fill;
|
||||
_cl_command_svm_fill_rect svm_fill_rect;
|
||||
_cl_command_svm_migrate svm_migrate;
|
||||
|
||||
_cl_command_svm_memadvise mem_advise;
|
||||
} _cl_command_t;
|
||||
|
||||
typedef struct _pocl_buffer_migration_info
|
||||
pocl_buffer_migration_info;
|
||||
|
||||
/**
|
||||
* Enum that represents different possible states of a command node.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
POCL_COMMAND_FAILED = -1,
|
||||
/* Default unless set to ready. */
|
||||
POCL_COMMAND_NOT_READY = 0,
|
||||
POCL_COMMAND_READY = 1,
|
||||
} pocl_command_state;
|
||||
|
||||
/* One item in a command queue or a command buffer. */
|
||||
typedef struct _cl_command_node _cl_command_node;
|
||||
struct _cl_command_node
|
||||
{
|
||||
_cl_command_t command;
|
||||
cl_command_type type;
|
||||
_cl_command_node *next; // for linked-list storage
|
||||
_cl_command_node *prev;
|
||||
|
||||
/***
|
||||
* Command buffers use sync points as a template for synchronizing commands
|
||||
* within the buffer. Commands outside the buffer can't depend on sync points
|
||||
* and individual commands in the buffer can't depend on events. Because this
|
||||
* struct is used both for recorded and immediately enqueued commands, the
|
||||
* two synchronization mechanisms are made mutually exclusive here.
|
||||
* */
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
cl_event event;
|
||||
} event;
|
||||
struct
|
||||
{
|
||||
cl_sync_point_khr sync_point;
|
||||
cl_uint num_sync_points_in_wait_list;
|
||||
cl_sync_point_khr *sync_point_wait_list;
|
||||
} syncpoint;
|
||||
} sync;
|
||||
cl_device_id device;
|
||||
/* The index of the targeted device in the **program** device list. */
|
||||
unsigned program_device_i;
|
||||
|
||||
/* Used to indicate if a node is ready to be executed or failed. */
|
||||
pocl_command_state state;
|
||||
|
||||
/* true if the node belongs to a cl_command_buffer_khr */
|
||||
cl_int buffered;
|
||||
|
||||
/* Which of the command queues in the command buffer's queue list
|
||||
* this command was recorded for. */
|
||||
cl_uint queue_idx;
|
||||
/* List of buffers this command accesses, used for inserting migrations */
|
||||
pocl_buffer_migration_info *migr_infos;
|
||||
|
||||
/* back pointer to the command buffer, when this command is recorded
|
||||
* in a cl_khr_command_buffer. NULL for other (non-buffered) commands */
|
||||
cl_command_buffer_khr cmd_buffer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Enumeration for different modes of converting automatic locals
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
POCL_AUTOLOCALS_TO_ARGS_NEVER = 0,
|
||||
POCL_AUTOLOCALS_TO_ARGS_ALWAYS = 1,
|
||||
/* convert autolocals to args only if there are dynamic local memory
|
||||
* function arguments in the kernel. */
|
||||
POCL_AUTOLOCALS_TO_ARGS_ONLY_IF_DYNAMIC_LOCALS_PRESENT = 2,
|
||||
} pocl_autolocals_to_args_strategy;
|
||||
|
||||
typedef struct pocl_version_t
|
||||
{
|
||||
unsigned major;
|
||||
unsigned minor;
|
||||
|
||||
#ifdef __cplusplus
|
||||
pocl_version_t () : major{0}, minor{0} {}
|
||||
pocl_version_t (unsigned the_major, unsigned the_minor)
|
||||
: major{the_major}, minor{the_minor}
|
||||
{
|
||||
}
|
||||
#endif
|
||||
} pocl_version_t;
|
||||
|
||||
#endif /* POCL_H */
|
||||
@@ -1,78 +0,0 @@
|
||||
/* pocl_device.h - global pocl declarations to be used in the device binaries in
|
||||
case applicable by the target
|
||||
|
||||
Copyright (c) 2012-2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_DEVICE_H
|
||||
#define POCL_DEVICE_H
|
||||
|
||||
#include "pocl_types.h"
|
||||
|
||||
#define MAX_KERNEL_ARGS 64
|
||||
#define MAX_KERNEL_NAME_LENGTH 64
|
||||
|
||||
/* Metadata of a single kernel stored in the device.*/
|
||||
typedef struct {
|
||||
const uchar name[MAX_KERNEL_NAME_LENGTH];
|
||||
ushort num_args;
|
||||
ushort num_locals;
|
||||
void *work_group_func;
|
||||
} __kernel_metadata;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define ALIGN4(x) __declspec(align(4)) x
|
||||
#define ALIGN8(x) __declspec(align(4)) x
|
||||
#else
|
||||
#define ALIGN4(x) x __attribute__ ((aligned (4)))
|
||||
#define ALIGN8(x) x __attribute__ ((aligned (8)))
|
||||
#endif
|
||||
|
||||
/* A kernel invocation command. */
|
||||
typedef struct {
|
||||
/* The kernel to execute. Points to the metadata in the device global
|
||||
memory. It will be casted to a __kernel_metadata* */
|
||||
ALIGN8 (uint kernel_meta);
|
||||
/* Pointer to the kernel arguments in the local memory. Will be
|
||||
casted to 32 bit void* */
|
||||
ALIGN8 (uint args);
|
||||
ALIGN8 (uint args_size);
|
||||
/* pocl context */
|
||||
ALIGN8 (uint ctx);
|
||||
ALIGN8 (uint ctx_size);
|
||||
/* The execution status of this queue slot. */
|
||||
ALIGN8 (uint status);
|
||||
} __kernel_exec_cmd;
|
||||
|
||||
/* Kernel execution statuses. */
|
||||
|
||||
/* The invocation entry is free to use. */
|
||||
#define POCL_KST_FREE 1
|
||||
/* The kernel structure has been populated and is waiting to be
|
||||
executed. */
|
||||
#define POCL_KST_READY 2
|
||||
/* The kernel is currently running in the device. */
|
||||
#define POCL_KST_RUNNING 3
|
||||
/* The kernel has finished execution. The results can be collected and the
|
||||
execution entry be freed (by writing POCL_KST_FREE to the status). */
|
||||
#define POCL_KST_FINISHED 4
|
||||
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
/* pocl_image_types.h - image data structure used by device implementations
|
||||
|
||||
Copyright (c) 2013 Ville Korhonen
|
||||
Copyright (c) 2017 Michal Babej / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __X86_IMAGE_H__
|
||||
#define __X86_IMAGE_H__
|
||||
|
||||
#ifdef __CBUILD__
|
||||
#define INTTYPE cl_int
|
||||
#else
|
||||
#define INTTYPE int
|
||||
#endif
|
||||
|
||||
typedef uintptr_t dev_sampler_t;
|
||||
|
||||
typedef struct dev_image_t {
|
||||
void *_data;
|
||||
INTTYPE _width;
|
||||
INTTYPE _height;
|
||||
INTTYPE _depth;
|
||||
INTTYPE _image_array_size;
|
||||
INTTYPE _row_pitch;
|
||||
INTTYPE _slice_pitch;
|
||||
INTTYPE _num_mip_levels; /* maybe not needed */
|
||||
INTTYPE _num_samples; /* maybe not needed */
|
||||
INTTYPE _order;
|
||||
INTTYPE _data_type;
|
||||
INTTYPE _num_channels;
|
||||
INTTYPE _elem_size;
|
||||
} dev_image_t;
|
||||
|
||||
#endif
|
||||
@@ -1,33 +0,0 @@
|
||||
/* pocl-spir.h - global pocl declarations for the SPIR(-V) support.
|
||||
|
||||
Copyright (c) 2018-2022 Pekka Jääskeläinen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef POCL_SPIR_H
|
||||
#define POCL_SPIR_H
|
||||
|
||||
#define SPIR_ADDRESS_SPACE_PRIVATE 0
|
||||
#define SPIR_ADDRESS_SPACE_GLOBAL 1
|
||||
#define SPIR_ADDRESS_SPACE_CONSTANT 2
|
||||
#define SPIR_ADDRESS_SPACE_LOCAL 3
|
||||
#define SPIR_ADDRESS_SPACE_GENERIC 4
|
||||
|
||||
#endif
|
||||
@@ -1,179 +0,0 @@
|
||||
/* pocl_types.h - The basic OpenCL C device side scalar data types.
|
||||
|
||||
Copyright (c) 2018 Pekka Jääskeläinen / Tampere University of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* This header is designed to be included both from the device and the host.
|
||||
In case compiling OpenCL C sources, __OPENCL_VERSION__ should be set.
|
||||
In case compiling in the host, all but the device-specific types are
|
||||
defined (size_t and others). Devices should avoid including the C
|
||||
stdint.h instead of this one as OpenCL C size_t et al. is allowed to
|
||||
be of different width than when targeting C.
|
||||
|
||||
TODO: replace this header (partially) with Clang's opencl-c.h
|
||||
*/
|
||||
|
||||
#ifndef POCL_DEVICE_TYPES_H
|
||||
#define POCL_DEVICE_TYPES_H
|
||||
|
||||
#ifdef __OPENCL_VERSION__
|
||||
|
||||
/* required for LLVM 13+ */
|
||||
typedef unsigned reserve_id_t;
|
||||
|
||||
#ifdef __USE_CLANG_OPENCL_C_H
|
||||
|
||||
/* Minimal definitions, only the target specific macro overrides,
|
||||
just in case Clang export the C ones which might differ for
|
||||
OpenCL C. */
|
||||
|
||||
#ifdef __INTPTR_TYPE__
|
||||
#undef __INTPTR_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __UINTPTR_TYPE__
|
||||
#undef __UINTPTR_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_MAX__
|
||||
#undef __SIZE_MAX__
|
||||
#endif
|
||||
|
||||
#if defined(POCL_DEVICE_ADDRESS_BITS) && POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#define __SIZE_MAX__ UINT_MAX
|
||||
#define __INTPTR_TYPE__ int
|
||||
#define __UINTPTR_TYPE__ uint
|
||||
#else
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#define __SIZE_MAX__ ULONG_MAX
|
||||
#define __INTPTR_TYPE__ long
|
||||
#define __UINTPTR_TYPE__ ulong
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#else
|
||||
|
||||
/* Compiling Device-specific OpenCL C or builtin library C. */
|
||||
|
||||
#if defined cl_khr_fp64 && !defined cl_khr_int64
|
||||
#error "cl_khr_fp64 requires cl_khr_int64"
|
||||
#endif
|
||||
|
||||
/* TODO FIXME We should not use these in OpenCL library's C code at all.
|
||||
* The problem is that 1) these are predefined by glibc, 2) while we can
|
||||
* re-define "ulong", we cannot control the size of "long" at all.
|
||||
* which can lead to "ulong" being 64bit and "long" 32bit, resulting in
|
||||
* mysterious errors and bugs. Therefore OpenCL library's C code should
|
||||
* use the fixed size C types where integer size matters. */
|
||||
|
||||
#ifdef __CBUILD__
|
||||
|
||||
/* Builtin library C code definitions. */
|
||||
|
||||
#define size_t csize_t
|
||||
#define uintptr_t cuintptr_t
|
||||
#define intptr_t cintptr_t
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#undef size_t
|
||||
#undef uintptr_t
|
||||
#undef intptr_t
|
||||
|
||||
typedef uint8_t uchar;
|
||||
typedef uint16_t ushort;
|
||||
typedef uint32_t uint;
|
||||
|
||||
#ifdef cl_khr_int64
|
||||
#if __APPLE__
|
||||
typedef unsigned long ulong;
|
||||
#else
|
||||
typedef uint64_t ulong;
|
||||
#endif
|
||||
#else
|
||||
typedef uint32_t ulong;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* The definitions below intentionally lead to errors if these types
|
||||
are used when they are not available in the language. This prevents
|
||||
accidentally using them if the compiler does not disable these
|
||||
types, but only e.g. defines them with an incorrect size.*/
|
||||
|
||||
#ifndef cl_khr_fp64
|
||||
typedef struct error_undefined_type_double error_undefined_type_double;
|
||||
#define double error_undefined_type_double
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_TYPE__
|
||||
#undef __SIZE_TYPE__
|
||||
#endif
|
||||
|
||||
#ifdef __SIZE_MAX__
|
||||
#undef __SIZE_MAX__
|
||||
#endif
|
||||
|
||||
#if defined(POCL_DEVICE_ADDRESS_BITS) && POCL_DEVICE_ADDRESS_BITS == 32
|
||||
#define __SIZE_TYPE__ uint
|
||||
#define __SIZE_MAX__ UINT_MAX
|
||||
#else
|
||||
#define __SIZE_TYPE__ ulong
|
||||
#define __SIZE_MAX__ ULONG_MAX
|
||||
#endif
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
typedef __PTRDIFF_TYPE__ ptrdiff_t;
|
||||
typedef ptrdiff_t intptr_t;
|
||||
typedef size_t uintptr_t;
|
||||
|
||||
#endif /* #ifdef __USE_CLANG_OPENCL_C_H */
|
||||
|
||||
#else /* #ifdef __OPENCL_VERSION__ */
|
||||
|
||||
/* Including from a host source (runtime API implementation). Introduce
|
||||
the fixed width datatypes, but do not override C's size_t and other
|
||||
target specific datatypes. */
|
||||
|
||||
typedef unsigned char uchar;
|
||||
|
||||
/* FIXME see the above TODO about these types. */
|
||||
|
||||
#if !(defined(_SYS_TYPES_H) && defined(__USE_MISC))
|
||||
/* glibc, when including sys/types.h, typedefs these. */
|
||||
|
||||
typedef unsigned long int ulong;
|
||||
typedef unsigned short int ushort;
|
||||
typedef unsigned int uint;
|
||||
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Reference in new issue
Block a user