mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 14:28:02 +03:00
local drivers
This commit is contained in:
1 parent
7e965fe195
commit
a71d522e5a
76 files changed
+37344
-18
No files matched your search
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,646 @@
|
||||
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,188 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,370 @@
|
||||
/*
|
||||
* 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
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* 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
@@ -0,0 +1,549 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* 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
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,677 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,386 @@
|
||||
/*
|
||||
* 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
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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__ */
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* 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__ */
|
||||
Reference in new issue
Block a user