Skip to content
Open
Changes from 1 commit
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
13 changes: 11 additions & 2 deletions placeholder_accessors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| Reply-to | Ruyman Reyes <[email protected]> |
| Original author | Ruyman Reyes <[email protected]> |
| Requirements | CP001 |
| Contributors | Gordon Brown <[email protected]>, Victor Lomuller <[email protected]>, Mehdi Goli <[email protected]>, Peter Zuzek <[email protected]>, Luke Iwanski <[email protected]> |
| Contributors | Gordon Brown <[email protected]>, Victor Lomuller <[email protected]>, Mehdi Goli <[email protected]>, Peter Zuzek <[email protected]>, Luke Iwanski <[email protected]>, Michael Haidl <[email protected]> |

## Overview

Expand Down Expand Up @@ -172,7 +172,10 @@ except for the aforementioned modifications.

### When `is_placeholder` returns true

The accessor API features constructors that don't take the handler parameter.
The accessor API features constructors that don't take the handler parameter
and/or memory object as a constructor. Accessors can then be default
constructed, and the memory object can be assigned later when registering
the accessor in the command group.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should describe the additional constructors which need to be added to allow deferred initialization of the memory object and handler.


In addition, a new method to obtain a normal accessor from the placeholder
accessor is provided.
Expand All @@ -192,6 +195,12 @@ The handler gains a new method,
that registers the requirements of the placeholder accessor on the given
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wish to support the option for constructing a regular accessor from a placeholder accessor (i.e. get_access) then this interface should also be extended to allow you to specify a memory object. We should also specify that an exception should be thrown if get_access is called without providing a memory object on a placeholder accessor which doesn't have a memory object already.

On a side note, perhaps we should consider changing the naming of this member function, get_access could be confused with the regular get_access member functions.

command group.

Another method, that allows specifying the memory object the placeholder
accessor will be associated is also provided:

`handler::require(buffer<T, dim> b,
accessor<T, dim, mode, target, acess::placeholder::true_t>)`


[1]: https://github.com/codeplaysoftware/sycl-blas "SYCL-BLAS"
[2]: https://github.com/lukeiwanski/tensorflow "TensorFlow/Eigen"
Expand Down