Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove underspecified vector_t #676

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adoc/chapters/opencl_backend.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1063,8 +1063,8 @@ OpenCL C functions that are linked with, using either offline or online
compilation, must be declared as [code]#extern "C"# function declarations.
The function parameters of these function declarations must be defined as the
OpenCL C interoperability aliases; [code]#pointer# of the [code]#multi_ptr#
class template, [code]#vector_t# of the [code]#vec# class template and scalar
data type aliases described in <<table.types.aliases>>.
class template, and scalar data type aliases described in
<<table.types.aliases>>.

// \include{opencl_extensions}
// %%%%%%%%%%%%%%%%%%%%%%%%%%%% begin opencl_extensions %%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
55 changes: 4 additions & 51 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17763,18 +17763,10 @@ Any other value shall produce a compilation failure.
The element type parameter, _DataT_, must be one of the basic scalar types
supported in device code.

The SYCL [code]#vec# class template provides interoperability with the
underlying vector type defined by [code]#vector_t# which is available only when
compiled for the device.
The SYCL [code]#vec# class can be constructed from an instance of
[code]#vector_t# and can implicitly convert to an instance of [code]#vector_t#
in order to support interoperability with native <<backend>> functions from a
SYCL kernel function.

An instance of the SYCL [code]#vec# class template can also be implicitly
converted to an instance of the data type when the number of elements is
[code]#1# in order to allow single element vectors and scalars to be convertible
with each other.
An instance of the SYCL [code]#vec# class template can be implicitly converted
to an instance of the data type when the number of elements is [code]#1# in
order to allow single element vectors and scalars to be convertible with each
other.

==== Vec interface

Expand Down Expand Up @@ -17826,15 +17818,6 @@ constexpr vec(const vec<DataT, NumElements>& rhs)
----
a@ Construct a vector of element type [code]#DataT# and number of elements [code]#NumElements# by copy from another similar vector.

a@
[source]
----
vec(vector_t nativeVector)
----
a@ Available only when: compiled for the device.

Constructs a SYCL [code]#vec# instance from an instance of the underlying backend-native vector type defined by [code]#vector_t#.

|====


Expand All @@ -17844,16 +17827,6 @@ Constructs a SYCL [code]#vec# instance from an instance of the underlying backen
[width="100%",options="header",separator="@",cols="65%,35%"]
|====
@ Member function @ Description
a@
[source]
----
operator vector_t() const
----
a@ Available only when: compiled for the device.

Converts this SYCL [code]#vec# instance to the underlying backend-native vector type
defined by [code]#vector_t#.

a@
[source]
----
Expand Down Expand Up @@ -18598,22 +18571,6 @@ using value_type = DataT
Each of these type aliases tells the type of an element in the underlying
[code]#vec#.

'''

[frame=all,grid=none,separator="@"]
|====
a@
[source]
----
#ifdef __SYCL_DEVICE_ONLY__
using vector_t = /*unspecified*/
#endif
----
|====
This type alias is available only in device code.
The [code]#vector_t# type represents a native vector type of [code]#NumElements#
elements where each element's type is [code]#DataT#.

[[sec:constructors.swizzled-vec]]
===== Constructors for the swizzled vector class templates

Expand Down Expand Up @@ -18656,10 +18613,6 @@ The destructors have no visible effect.
a@
[source]
----
#ifdef __SYCL_DEVICE_ONLY__
operator vector_t() const
#endif

operator DataT() const
static constexpr size_t byte_size() noexcept
static constexpr size_t size() noexcept
Expand Down
10 changes: 0 additions & 10 deletions adoc/headers/vec.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ template <typename DataT, int NumElements> class vec {
using element_type = DataT;
using value_type = DataT;

#ifdef __SYCL_DEVICE_ONLY__
using vector_t = __unspecified__;
#endif

vec();

explicit constexpr vec(const DataT& arg);
Expand All @@ -49,12 +45,6 @@ template <typename DataT, int NumElements> class vec {

constexpr vec(const vec<DataT, NumElements>& rhs);

#ifdef __SYCL_DEVICE_ONLY__
vec(vector_t nativeVector);

operator vector_t() const;
#endif

// Available only when: NumElements == 1
operator DataT() const;

Expand Down
Loading