STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Friends | List of all members
Concurrency::graphics::texture< _Value_type, _Rank > Class Template Reference

A texture is a data aggregate on an accelerator_view in the extent domain. It is a collection of variables, one for each element in an extent domain. Each variable holds a value corresponding to C++ primitive type (unsigned int, int, float, double), or scalar type norm, or unorm (defined in concurrency::graphics), or eligible short vector types defined in concurrency::graphics. More...

#include <amp_graphics.h>

Inheritance diagram for Concurrency::graphics::texture< _Value_type, _Rank >:
Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >

Public Member Functions

 texture (const Concurrency::extent< _Rank > &_Ext) __CPU_ONLY
 Construct a texture from extents. More...
 
 texture (int _E0) __CPU_ONLY
 Construct texture<T,1> with the extent _E0 More...
 
 texture (int _E0, int _E1) __CPU_ONLY
 Construct a texture<T,2> from two integer extents. More...
 
 texture (int _E0, int _E1, int _E2) __CPU_ONLY
 Construct a texture<T,3> from three integer extents. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture from extents, bound to a specific accelerator_view. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture from extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,1> with the extent _E0, bound to a specific accelerator_view. More...
 
 texture (int _E0, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,1> with the extent _E0, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,2> from two integer extents, bound to a specific accelerator_view. More...
 
 texture (int _E0, int _E1, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,2> from two integer extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, int _E2, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,3> from three integer extents, bound to a specific accelerator_view. More...
 
 texture (int _E0, int _E1, int _E2, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,3> from three integer extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (const Concurrency::extent< _Rank > &_Ext, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 Construct a texture initialized from a pair of iterators into a container. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 Construct a texture<T,1> with the extent _E0 and from a pair of iterators into a container. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 Construct a texture<T,2> with two integers and initialized from a pair of iterators into a container. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, int _E2, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 Construct a texture<T,3> with three integers and initialized from a pair of iterators into a container. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (const Concurrency::extent< _Rank > &_Ext, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture initialized from a pair of iterators into a container, bound to a specific accelerator_view. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (const Concurrency::extent< _Rank > &_Ext, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,1> with integer _E0 and initialized from a pair of iterators into a container, bound to a specific accelerator_view. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,1> with integer _E0 and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,2> with two integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,2> with two integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, int _E2, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,3> with three integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view. More...
 
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
 texture (int _E0, int _E1, int _E2, _Input_iterator _Src_first, _Input_iterator _Src_last, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,3> with three integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture from extents and specified bits per scalar element More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, unsigned int _Bits_per_scalar_element, unsigned int _Mipmap_levels) __CPU_ONLY
 Construct a texture from extents, specified bits per scalar element and number of mipmap levels More...
 
 texture (int _E0, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,1> with integer _E0 and specified bits per scalar element More...
 
 texture (int _E0, int _E1, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,2> with two integers and specified bits per scalar element More...
 
 texture (int _E0, int _E1, int _E2, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,3> with three integers and specified bits per scalar element More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture from extents and specified bits per scalar element, bound to a specific accelerator_view. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, unsigned int _Bits_per_scalar_element, unsigned int _Mipmap_levels, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture from extents, specified bits per scalar element and number of mipmap levels More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture from extents and specified bits per scalar element, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T, 1> with integer _E0 and specified bits per scalar element, bound to a specific accelerator. More...
 
 texture (int _E0, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T, 1> with integer _E0 and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,2> with two integers and specified bits per scalar element, bound to a specific accelerator. More...
 
 texture (int _E0, int _E1, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,2> with two integers and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, int _E2, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T,3> with three integers and specified bits per scalar element, bound to a specific accelerator. More...
 
 texture (int _E0, int _E1, int _E2, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T,3> with three integers and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture from extents and specified bits per scalar element, initialized from a host buffer. More...
 
 texture (int _E0, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,1> with integer _E0 and specified bits per scalar element, initialized from a host buffer. More...
 
 texture (int _E0, int _E1, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,2> with two integers and specified bits per scalar element, initialized from a host buffer. More...
 
 texture (int _E0, int _E1, int _E2, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 Construct a texture<T,3> with three integers and specified bits per scalar element, initialized from a host buffer. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture from extents and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view. More...
 
 texture (const Concurrency::extent< _Rank > &_Ext, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture from extents and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T, 1> with integer _E0 and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view. More...
 
 texture (int _E0, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T, 1> with integer _E0 and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T, 2> with two integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view. More...
 
 texture (int _E0, int _E1, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T, 2> with two integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (int _E0, int _E1, int _E2, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av) __CPU_ONLY
 Construct a texture<T, 3> with three integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view. More...
 
 texture (int _E0, int _E1, int _E2, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 Construct a staging texture<T, 3> with three integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture. More...
 
 texture (const texture_view< _Value_type, _Rank > &_Src)
 Construct a texture from a texture_view. Deep copy More...
 
 texture (const texture_view< const _Value_type, _Rank > &_Src)
 Construct a texture from a read-only texture_view. Deep copy More...
 
 texture (const texture_view< _Value_type, _Rank > &_Src, const Concurrency::accelerator_view &_Acc_view)
 Construct a texture from a texture_view on another accelerator_view. Deep copy More...
 
 texture (const texture_view< const _Value_type, _Rank > &_Src, const Concurrency::accelerator_view &_Acc_view)
 Construct a texture from a read-only texture_view on another accelerator_view. Deep copy More...
 
 texture (const texture_view< _Value_type, _Rank > &_Src, const Concurrency::accelerator_view &_Acc_view, const Concurrency::accelerator_view &_Associated_av)
 Construct a staging texture from a texture_view on another accelerator_view. Deep copy More...
 
 texture (const texture_view< const _Value_type, _Rank > &_Src, const Concurrency::accelerator_view &_Acc_view, const Concurrency::accelerator_view &_Associated_av)
 Construct a staging texture from a read-only texture_view on another accelerator_view. Deep copy More...
 
 texture (const texture &_Src)
 Copy constructor. Deep copy More...
 
 texture (texture &&_Other)
 Move constructor More...
 
 texture (const texture &_Src, const Concurrency::accelerator_view &_Av)
 Copy constructor. Deep copy More...
 
 texture (const texture &_Src, const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av)
 Copy constructor. Deep copy More...
 
textureoperator= (const texture &_Other)
 Copy assignment operator. Deep copy More...
 
textureoperator= (texture< _Value_type, _Rank > &&_Other)
 Move assignment operator More...
 
void copy_to (texture &_Dest) const
 Copy-to, deep copy More...
 
void copy_to (const writeonly_texture_view< _Value_type, _Rank > &_Dest) const
 Copy-to, deep copy More...
 
 ~texture () __CPU_ONLY
 Destructor More...
 
const _Value_type operator[] (const index< _Rank > &_Index) const __GPU_ONLY
 Get the element value indexed by _Index. More...
 
const _Value_type operator[] (int _I0) const __GPU_ONLY
 Get the element value indexed by _I. More...
 
const _Value_type operator() (const index< _Rank > &_Index) const __GPU_ONLY
 Get the element value indexed by _Index. More...
 
const _Value_type operator() (int _I0) const __GPU_ONLY
 Get the element value indexed by _I0 More...
 
const _Value_type operator() (int _I0, int _I1) const __GPU_ONLY
 Get the element value indexed by (_I0,_I1) More...
 
const _Value_type operator() (int _I0, int _I1, int _I2) const __GPU_ONLY
 Get the element value indexed by (_I0,_I1,_I2) More...
 
const _Value_type get (const index< _Rank > &_Index) const __GPU_ONLY
 Get the element value indexed by _Index. More...
 
void set (const index< _Rank > &_Index, const _Value_type &_Value) __GPU_ONLY
 Set the element indexed by _Index with value _Value. More...
 
_Ret_ voiddata () __CPU_ONLY
 Returns a CPU pointer to the raw data of this texture. More...
 
const voiddata () const __CPU_ONLY
 Returns a CPU pointer to the raw data of this texture. More...
 
 __declspec (property(get=get_row_pitch)) unsigned int row_pitch
 Returns the row pitch (in bytes) of a 2D or 3D staging texture on the CPU to be used for navigating the staging texture from row to row on the CPU. More...
 
unsigned int get_row_pitch () const __CPU_ONLY
 
 __declspec (property(get=get_depth_pitch)) unsigned int depth_pitch
 Returns the depth pitch (in bytes) of a 3D staging texture on the CPU to be used for navigating the staging texture from depth slice to depth slice on the CPU. More...
 
unsigned int get_depth_pitch () const __CPU_ONLY
 
__declspec(property(get=get_associated_accelerator_view)) Concurrency Concurrency::accelerator_view get_associated_accelerator_view () const __CPU_ONLY
 Returns the accelerator_view that is the preferred target where this texture can be copied. More...
 
- Public Member Functions inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
__declspec(property(get=get_extent)) Concurrency Concurrency::extent< _Rank > get_extent () const __GPU
 Returns the extent that defines the shape of this texture or texture view. More...
 
Concurrency::extent< _Rank > get_mipmap_extent (unsigned int _Mipmap_level) const __CPU_ONLY
 Returns the extent for specific mipmap level of this texture or texture view. More...
 
Concurrency::extent< _Rank > get_mipmap_extent (unsigned int _Mipmap_level) const __GPU_ONLY
 Returns the extent for specific mipmap level of this texture or texture view. More...
 
__declspec(property(get=get_accelerator_view)) Concurrency Concurrency::accelerator_view get_accelerator_view () const __CPU_ONLY
 Returns the accelerator_view where this texture or texture view is located. More...
 
 __declspec (property(get=get_bits_per_scalar_element)) unsigned int bits_per_scalar_element
 Returns the number of bits per scalar element More...
 
unsigned int get_bits_per_scalar_element () const __CPU_ONLY
 
 __declspec (property(get=get_mipmap_levels)) unsigned int mipmap_levels
 Query how many mipmap levels are accessible by this texture (or texture view). More...
 
unsigned int get_mipmap_levels () const __GPU
 
 __declspec (property(get=get_data_length)) unsigned int data_length
 Returns the physical data length (in bytes) that is required in order to represent the texture on the host side with its native format. If the texture contains multiple mipmap levels the value represents the sum of physical data length for each accessible mipmap level by this texture (or texture view). More...
 
unsigned int get_data_length () const __CPU_ONLY
 

Private Member Functions

 texture (const Concurrency::extent< _Rank > &_Ext, const _Texture_descriptor &_Descriptor)
 
bool _Should_create_staging_texture (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av)
 
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av) __CPU_ONLY
 
template<typename _Input_iterator >
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 
template<typename _Input_iterator >
void _Initialize (const Concurrency::accelerator_view &_Av, _Input_iterator _Src_first, _Input_iterator _Src_last) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const void *_Source, unsigned int _Src_byte_size, unsigned int _Bits_per_scalar_element) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, const void *_Source, unsigned int _Src_byte_size) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const void *_Source, unsigned int _Src_byte_size) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, const details::_Texture_base< _Value_type, _Rank > &_Src) __CPU_ONLY
 
void _Initialize (const Concurrency::accelerator_view &_Av, const details::_Texture_base< _Value_type, _Rank > &_Src) __CPU_ONLY
 

Friends

template<typename _Value_type , int _Rank>
texture< _Value_type, _Rank > direct3d::make_texture (const Concurrency::accelerator_view &_Av, _In_ IUnknown *_D3D_texture, DXGI_FORMAT _View_format) __CPU_ONLY
 

Additional Inherited Members

- Public Types inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
typedef _Value_type value_type
 
typedef _Short_vector_type_traits< _Value_type >::_Scalar_type scalar_type
 
- Static Public Attributes inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
static const int rank = _Rank
 
- Protected Types inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
typedef Concurrency::details::_Texture_descriptor _Texture_descriptor
 
- Protected Member Functions inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
 _Texture_base () __CPU_ONLY
 
 _Texture_base (const Concurrency::extent< _Rank > &_Ext, unsigned int _Mipmap_levels=1) __CPU_ONLY
 
 _Texture_base (const _Texture_base &_Src) __GPU
 
 _Texture_base (const _Texture_base &_Src, unsigned int _Most_detailed_mipmap_level, unsigned int _View_mipmap_levels) __CPU_ONLY
 
 _Texture_base (const _Texture_base &_Src, bool _Flatten_mipmap_levels) __GPU_ONLY
 
 _Texture_base (const Concurrency::extent< _Rank > &_Ext, const _Texture_descriptor &_Desc) __CPU_ONLY
 
void _Copy_to (const _Texture_base &_Dest) const __CPU_ONLY
 
bool operator== (const _Texture_base &_Other) const __CPU_ONLY
 
 ~_Texture_base () __GPU
 
_Ret_ _Texture_Get_texture () const __CPU_ONLY
 
unsigned int _Get_most_detailed_mipmap_level () const __GPU
 
bool _Are_mipmap_levels_overlapping (const _Texture_base &_Other) const __CPU_ONLY
 
- Protected Attributes inherited from Concurrency::graphics::details::_Texture_base< _Value_type, _Rank >
Concurrency::extent< _Rank > _M_extent
 
_Texture_descriptor _M_texture_descriptor
 

Detailed Description

template<typename _Value_type, int _Rank>
class Concurrency::graphics::texture< _Value_type, _Rank >

A texture is a data aggregate on an accelerator_view in the extent domain. It is a collection of variables, one for each element in an extent domain. Each variable holds a value corresponding to C++ primitive type (unsigned int, int, float, double), or scalar type norm, or unorm (defined in concurrency::graphics), or eligible short vector types defined in concurrency::graphics.

Parameters
_Value_typeThe type of the elements in the texture aggregates.
_RankThe _Rank of the corresponding extent domain.

Constructor & Destructor Documentation

template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext)
inline

Construct a texture from extents.

Parameters
_ExtentAn extent that describes the shape of the texture.
667  : _Texture_base(_Ext)
668  {
669  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
670  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
672  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0)
inline

Construct texture<T,1> with the extent _E0

Parameters
_E0An integer that is the length of this texture (width).
682  {
683  static_assert(_Rank == 1, "texture(int) is only permissible on texture<value_type, 1>.");
684  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
685  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
687  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1 
)
inline

Construct a texture<T,2> from two integer extents.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
700  {
701  static_assert(_Rank == 2, "texture(int, int) is only permissible on texture<value_type, 2>.");
702  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
703  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
705  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2 
)
inline

Construct a texture<T,3> from three integer extents.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
720  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
721  {
722  static_assert(_Rank == 3, "texture(int, int, int) is only permissible on texture<value_type, 3>.");
723  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
724  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
726  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture from extents, bound to a specific accelerator_view.

Parameters
_ExtentAn extent that describes the shape of the texture.
_AvAn accelerator_view where this texture resides.
738  : _Texture_base(_Ext)
739  {
740  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
741  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
742  _Initialize(_Av);
743  }
Definition: amprt.h:297
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture from extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_ExtAn extent that describes the shape of the texture.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
761  : _Texture_base(_Ext)
762  {
763  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
764  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
765  _Initialize(_Av, _Associated_av);
766  }
Definition: amprt.h:297
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,1> with the extent _E0, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of this texture (width).
_AvAn accelerator_view where this texture resides.
779  {
780  static_assert(_Rank == 1, "texture(int, accelerator_view) is only permissible on texture<value_type, 1>.");
781  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
782  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
783  _Initialize(_Av);
784  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,1> with the extent _E0, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of this texture (width).
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
803  {
804  static_assert(_Rank == 1, "texture(int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 1>.");
805  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
806  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
807  _Initialize(_Av, _Associated_av);
808  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,2> from two integer extents, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_AvAn accelerator_view where this texture resides.
824  {
825  static_assert(_Rank == 2, "texture(int, int, accelerator_view) is only permissible on texture<value_type, 2>.");
826  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
827  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
828  _Initialize(_Av);
829  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,2> from two integer extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
851  {
852  static_assert(_Rank == 2, "texture(int, int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 2>.");
853  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
854  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
855  _Initialize(_Av, _Associated_av);
856  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,3> from three integer extents, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_AvAn accelerator_view where this texture resides.
874  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
875  {
876  static_assert(_Rank == 3, "texture(int, int, int, accelerator_view) is only permissible on texture<value_type, 3>.");
877  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
878  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
879  _Initialize(_Av);
880  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,3> from three integer extents, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
904  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
905  {
906  static_assert(_Rank == 3, "texture(int, int, int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 3>.");
907  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
908  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
909  _Initialize(_Av, _Associated_av);
910  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inline

Construct a texture initialized from a pair of iterators into a container.

Parameters
_ExtAn extent that describes the shape of the texture.
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
927  : _Texture_base(_Ext)
928  {
929  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
930  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
931  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Src_first, _Src_last);
932  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inline

Construct a texture<T,1> with the extent _E0 and from a pair of iterators into a container.

Parameters
_E0An integer that is the length of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
950  {
951  static_assert(_Rank == 1, "texture(int, iterator, iterator) is only permissible on texture<value_type, 1>.");
952  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
953  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
954  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Src_first, _Src_last);
955  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inline

Construct a texture<T,2> with two integers and initialized from a pair of iterators into a container.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
976  {
977  static_assert(_Rank == 2, "texture(int, int, iterator, iterator) is only permissible on texture<value_type, 2>.");
978  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
979  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
980  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Src_first, _Src_last);
981  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inline

Construct a texture<T,3> with three integers and initialized from a pair of iterators into a container.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
1005  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1006  {
1007  static_assert(_Rank == 3, "texture(int, int, int, iterator, iterator) is only permissible on texture<value_type, 3>.");
1008  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1009  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1010  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Src_first, _Src_last);
1011  }
Definition: amprt.h:297
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture initialized from a pair of iterators into a container, bound to a specific accelerator_view.

Parameters
_ExtAn extent that describes the shape of the texture.
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
1031  : _Texture_base(_Ext)
1032  {
1033  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1034  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1035  _Initialize(_Av, _Src_first, _Src_last);
1036  }
Definition: amprt.h:297
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_ExtAn extent that describes the shape of the texture.
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1062  : _Texture_base(_Ext)
1063  {
1064  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1065  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1066  _Initialize(_Av, _Associated_av, _Src_first, _Src_last);
1067  }
Definition: amprt.h:297
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,1> with integer _E0 and initialized from a pair of iterators into a container, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
1088  {
1089  static_assert(_Rank == 1, "texture(int, iterator, iterator, accelerator_view) is only permissible on texture<value_type, 1>.");
1090  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1091  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1092  _Initialize(_Av, _Src_first, _Src_last);
1093  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,1> with integer _E0 and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1120  {
1121  static_assert(_Rank == 1, "texture(int, iterator, iterator, accelerator_view, accelerator_view) is only permissible on texture<value_type, 1>.");
1122  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1123  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1124  _Initialize(_Av, _Associated_av, _Src_first, _Src_last);
1125  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,2> with two integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
1149  {
1150  static_assert(_Rank == 2, "texture(int, int, iterator, iterator, accelerator_view) is only permissible on texture<value_type, 2>.");
1151  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1152  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1153  _Initialize(_Av, _Src_first, _Src_last);
1154  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,2> with two integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1184  {
1185  static_assert(_Rank == 2, "texture(int, int, iterator, iterator, accelerator_view, accelerator_view) is only permissible on texture<value_type, 2>.");
1186  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1187  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1188  _Initialize(_Av, _Associated_av, _Src_first, _Src_last);
1189  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,3> with three integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
1215  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1216  {
1217  static_assert(_Rank == 3, "texture(int, int, int, iterator, iterator, accelerator_view) is only permissible on texture<value_type, 3>.");
1218  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1219  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1220  _Initialize(_Av, _Src_first, _Src_last);
1221  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
template<typename _Input_iterator , typename = typename std::enable_if<details::_Is_iterator<_Input_iterator>::value>::type>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,3> with three integers and initialized from a pair of iterators into a container, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Src_lastAn ending iterator into the source container.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1253  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1254  {
1255  static_assert(_Rank == 3, "texture(int, int, int, iterator, iterator, accelerator_view, accelerator_view) is only permissible on texture<value_type, 3>.");
1256  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "texture cannot be constructed from unorm based short vectors via this constructor.");
1257  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "texture cannot be constructed from norm based short vectors via this constructor.");
1258  _Initialize(_Av, _Associated_av, _Src_first, _Src_last);
1259  }
Definition: amprt.h:297
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
Definition: amprt.h:296
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture from extents and specified bits per scalar element

Parameters
_ExtAn extent that describes the shape of the texture.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1274  : _Texture_base(_Ext)
1275  {
1276  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Bits_per_scalar_element);
1277  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
unsigned int  _Bits_per_scalar_element,
unsigned int  _Mipmap_levels 
)
inline

Construct a texture from extents, specified bits per scalar element and number of mipmap levels

Parameters
_ExtAn extent that describes the shape of the texture.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_Mipmap_levelsNumber of mipmap levels in the underlying texture. If 0 is specified, the texture will have full range of mipmap levels down to smallest possible size for the given extent.
1296  : _Texture_base(_Ext, _Mipmap_levels)
1297  {
1298  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Bits_per_scalar_element);
1299  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,1> with integer _E0 and specified bits per scalar element

Parameters
_E0An integer that is the length of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1315  {
1316  static_assert(_Rank == 1, "texture(int, unsigned int) is only permissible on texture<value_type, 1>.");
1317  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Bits_per_scalar_element);
1318  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,2> with two integers and specified bits per scalar element

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1337  {
1338  static_assert(_Rank == 2, "texture(int, int, unsigned int) is only permissible on texture<value_type, 2>.");
1339  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Bits_per_scalar_element);
1340  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,3> with three integers and specified bits per scalar element

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the next-to-most-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Src_firstA beginning iterator into the source container.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1364  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1365  {
1366  static_assert(_Rank == 3, "texture(int, int, int, unsigned int) is only permissible on texture<value_type, 3>.");
1367  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Bits_per_scalar_element);
1368  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture from extents and specified bits per scalar element, bound to a specific accelerator_view.

Parameters
_ExtAn extent that describes the shape of the texture.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1387  : _Texture_base(_Ext)
1388  {
1389  _Initialize(_Av, _Bits_per_scalar_element);
1390  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
unsigned int  _Bits_per_scalar_element,
unsigned int  _Mipmap_levels,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture from extents, specified bits per scalar element and number of mipmap levels

Parameters
_ExtAn extent that describes the shape of the texture.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_Mipmap_levelsNumber of mipmap levels in the underlying texture. If 0 is specified, the texture will have full range of mipmap levels down to smallest possible size for the given extent.
_AvAn accelerator_view where this texture resides.
1412  : _Texture_base(_Ext, _Mipmap_levels)
1413  {
1414  _Initialize(_Av, _Bits_per_scalar_element);
1415  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture from extents and specified bits per scalar element, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_ExtAn extent that describes the shape of the texture.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1439  : _Texture_base(_Ext)
1440  {
1441  _Initialize(_Av, _Associated_av, _Bits_per_scalar_element);
1442  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T, 1> with integer _E0 and specified bits per scalar element, bound to a specific accelerator.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1461  {
1462  static_assert(_Rank == 1, "texture(int, unsigned int, accelerator_view) is only permissible on texture<value_type, 1>.");
1463  _Initialize(_Av, _Bits_per_scalar_element);
1464  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T, 1> with integer _E0 and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1489  {
1490  static_assert(_Rank == 1, "texture(int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 1>.");
1491  _Initialize(_Av, _Associated_av, _Bits_per_scalar_element);
1492  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,2> with two integers and specified bits per scalar element, bound to a specific accelerator.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1514  {
1515  static_assert(_Rank == 2, "texture(int, int, unsigned int, accelerator_view) is only permissible on texture<value_type, 2>.");
1516  _Initialize(_Av, _Bits_per_scalar_element);
1517  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,2> with two integers and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1545  {
1546  static_assert(_Rank == 2, "texture(int, int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 2>.");
1547  _Initialize(_Av, _Associated_av, _Bits_per_scalar_element);
1548  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T,3> with three integers and specified bits per scalar element, bound to a specific accelerator.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the least-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1572  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1573  {
1574  static_assert(_Rank == 3, "texture(int, int, int, unsigned int, accelerator_view) is only permissible on texture<value_type, 3>.");
1575  _Initialize(_Av, _Bits_per_scalar_element);
1576  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T,3> with three integers and specified bits per scalar element, bound to a specific accelerator and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the least-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1606  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1607  {
1608  static_assert(_Rank == 3, "texture(int, int, int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 3>.");
1609  _Initialize(_Av, _Associated_av, _Bits_per_scalar_element);
1610  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture from extents and specified bits per scalar element, initialized from a host buffer.

Parameters
_ExtAn extent that describes the shape of the texture.
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1631  : _Texture_base(_Ext)
1632  {
1633  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Source, _Src_byte_size, _Bits_per_scalar_element);
1634  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,1> with integer _E0 and specified bits per scalar element, initialized from a host buffer.

Parameters
_E0An integer that is the length of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1656  {
1657  static_assert(_Rank == 1, "texture(int, void *, unsigned int, unsigned int) is only permissible on texture<value_type, 1>.");
1658  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Source, _Src_byte_size, _Bits_per_scalar_element);
1659  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,2> with two integers and specified bits per scalar element, initialized from a host buffer.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1684  {
1685  static_assert(_Rank == 2, "texture(int, int, void *, unsigned int, unsigned int) is only permissible on texture<value_type, 2>.");
1686  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Source, _Src_byte_size, _Bits_per_scalar_element);
1687  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inline

Construct a texture<T,3> with three integers and specified bits per scalar element, initialized from a host buffer.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the least-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
1715  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1716  {
1717  static_assert(_Rank == 3, "texture(int, int, int, void *, unsigned int, unsigned int) is only permissible on texture<value_type, 3>.");
1718  _Initialize(Concurrency::details::_Select_default_accelerator().default_view, _Source, _Src_byte_size, _Bits_per_scalar_element);
1719  }
_AMPIMP accelerator __cdecl _Select_default_accelerator()
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture from extents and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view.

Parameters
_ExtAn extent that describes the shape of the texture.
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1743  : _Texture_base(_Ext)
1744  {
1745  _Initialize(_Av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1746  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture from extents and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_ExtAn extent that describes the shape of the texture.
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1776  : _Texture_base(_Ext)
1777  {
1778  _Initialize(_Av, _Associated_av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1779  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T, 1> with integer _E0 and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1804  {
1805  static_assert(_Rank == 1, "texture(int, void *, unsigned int, unsigned int, accelerator_view) is only permissible on texture<value_type, 1>.");
1806  _Initialize(_Av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1807  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T, 1> with integer _E0 and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1838  {
1839  static_assert(_Rank == 1, "texture(int, void *, unsigned int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 1>.");
1840  _Initialize(_Av, _Associated_av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1841  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T, 2> with two integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1869  {
1870  static_assert(_Rank == 2, "texture(int, int, void *, unsigned int, unsigned int, accelerator_view) is only permissible on texture<value_type, 2>.");
1871  _Initialize(_Av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1872  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T, 2> with two integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (height).
_E1An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1906  {
1907  static_assert(_Rank == 2, "texture(int, int, void *, unsigned int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 2>.");
1908  _Initialize(_Av, _Associated_av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1909  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av 
)
inline

Construct a texture<T, 3> with three integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the least-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
1939  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1940  {
1941  static_assert(_Rank == 3, "texture(int, int, int, void *, unsigned int, unsigned int, accelerator_view) is only permissible on texture<value_type, 3>.");
1942  _Initialize(_Av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1943  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( int  _E0,
int  _E1,
int  _E2,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture<T, 3> with three integers and specified bits per scalar element, initialized from a host buffer, bound to a specific accelerator_view and an associated accelerator_view that is the preferred location for copying to/from this texture.

Parameters
_E0An integer that is the length of the most-significant dimension of this texture (depth).
_E1An integer that is the length of the least-significant dimension of this texture (height).
_E2An integer that is the length of the least-significant dimension of this texture (width).
_SourceA pointer to a host buffer.
_Source_byte_sizeNumber of bytes in the source buffer.
_Bits_per_scalar_elementNumber of bits per each scalar element in the underlying scalar type of the texture. In general, supported value is 8, 16, 32, 64. If 0 is specified, the number of bits picks defaulted value for the underlying scalar_type. 64 is only valid for double based textures
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
1979  : _Texture_base(Concurrency::extent<_Rank>(_E0, _E1, _E2))
1980  {
1981  static_assert(_Rank == 3, "texture(int, int, int, void *, unsigned int, unsigned int, accelerator_view, accelerator_view) is only permissible on texture<value_type, 3>.");
1982  _Initialize(_Av, _Associated_av, _Source, _Src_byte_size, _Bits_per_scalar_element);
1983  }
The extent type represents an N-dimensional vector of int which specifies the bounds of an N-dimen...
Definition: amp.h:383
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< _Value_type, _Rank > &  _Src)
inline

Construct a texture from a texture_view. Deep copy

Parameters
_SrcThe texture_view to copy from.
1992  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
1993  {
1994  _Initialize(_Src.accelerator_view, _Src);
1995  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< const _Value_type, _Rank > &  _Src)
inline

Construct a texture from a read-only texture_view. Deep copy

Parameters
_SrcThe read-only texture_view to copy from.
2004  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2005  {
2006  _Initialize(_Src.accelerator_view, _Src);
2007  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Acc_view 
)
inline

Construct a texture from a texture_view on another accelerator_view. Deep copy

Parameters
_SrcThe texture_view to copy from.
_Acc_viewAn accelerator_view where this texture resides.
2019  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2020  {
2021  _Initialize(_Acc_view, _Src);
2022  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< const _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Acc_view 
)
inline

Construct a texture from a read-only texture_view on another accelerator_view. Deep copy

Parameters
_SrcThe read-only texture_view to copy from.
_Acc_viewAn accelerator_view where this texture resides.
2034  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2035  {
2036  _Initialize(_Acc_view, _Src);
2037  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Acc_view,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture from a texture_view on another accelerator_view. Deep copy

Parameters
_SrcThe texture_view to copy from.
_Acc_viewAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
2053  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2054  {
2055  _Initialize(_Acc_view, _Associated_av, _Src);
2056  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture_view< const _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Acc_view,
const Concurrency::accelerator_view _Associated_av 
)
inline

Construct a staging texture from a read-only texture_view on another accelerator_view. Deep copy

Parameters
_SrcThe read-only texture_view to copy from.
_Acc_viewAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
2072  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2073  {
2074  _Initialize(_Acc_view, _Associated_av, _Src);
2075  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture< _Value_type, _Rank > &  _Src)
inline

Copy constructor. Deep copy

Parameters
_SrcThe texture to copy from.
2084  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2085  {
2086  _Initialize(_Src.accelerator_view, _Src.associated_accelerator_view, _Src);
2087  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( texture< _Value_type, _Rank > &&  _Other)
inline

Move constructor

Parameters
_OtherThe source texture to move from.
2096  {
2097  *this = std::move(_Other);
2098  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture< _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Av 
)
inline

Copy constructor. Deep copy

Parameters
_SrcThe texture to copy from.
_AvAn accelerator_view where this texture resides.
2110  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2111  {
2112  _Initialize(_Av, _Src);
2113  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const texture< _Value_type, _Rank > &  _Src,
const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inline

Copy constructor. Deep copy

Parameters
_SrcThe texture to copy from.
_AvAn accelerator_view where this texture resides.
_Associated_avAn accelerator_view which specifies the preferred target location for copies to/from the texture.
2129  : _Texture_base(_Src.extent, _Src.get_mipmap_levels())
2130  {
2131  _Initialize(_Av, _Associated_av, _Src);
2132  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
_Texture_base() __CPU_ONLY
Definition: amp_graphics.h:502
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::~texture ( )
inline

Destructor

2226  {
2227  }
template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::texture ( const Concurrency::extent< _Rank > &  _Ext,
const _Texture_descriptor _Descriptor 
)
inlineprivate
2419  : details::_Texture_base<_Value_type, _Rank>(_Ext, _Descriptor)
2420  {
2421  }

Member Function Documentation

template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::__declspec ( property(get=get_row_pitch )

Returns the row pitch (in bytes) of a 2D or 3D staging texture on the CPU to be used for navigating the staging texture from row to row on the CPU.

template<typename _Value_type, int _Rank>
Concurrency::graphics::texture< _Value_type, _Rank >::__declspec ( property(get=get_depth_pitch )

Returns the depth pitch (in bytes) of a 3D staging texture on the CPU to be used for navigating the staging texture from depth slice to depth slice on the CPU.

template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av,
unsigned int  _Bits_per_scalar_element 
)
inlineprivate
2429  {
2430  if (_Bits_per_scalar_element != 8 && _Bits_per_scalar_element != 16 &&
2431  _Bits_per_scalar_element != 32 && _Bits_per_scalar_element != 64)
2432  {
2433  throw runtime_exception("Invalid _Bits_per_scalar_element argument - it can only be 8, 16, 32, or 64.", E_INVALIDARG);
2434  }
2435 
2436  // special cases for 64 and for double based textures
2437 
2438 #pragma warning( push )
2439 #pragma warning( disable : 4127 ) // conditional expression is constant
2440  if (_Bits_per_scalar_element == 64 && _Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Double_type)
2441  {
2442  throw runtime_exception("Invalid _Bits_per_scalar_element argument - 64 is only valid for texture of double based short vector types.", E_INVALIDARG);
2443  }
2444 
2445  if (_Bits_per_scalar_element != 64 && _Short_vector_type_traits<_Value_type>::_Format_base_type_id == _Double_type)
2446  {
2447  throw runtime_exception("Invalid _Bits_per_scalar_element argument - it can only be 64 for texture of double based short vector types.", E_INVALIDARG);
2448  }
2449 
2450  details::_Is_valid_data_length(this->_M_extent.size(), _Bits_per_scalar_element * _Short_vector_type_traits<_Value_type>::_Num_channels);
2451 
2452  // the rest of the check is done by _Texture::_Create_texture, it depends on the underlying supported DXGI formats.
2453 
2454  unsigned int _Bits_per_channel = _Bits_per_scalar_element;
2455 
2456  if (_Short_vector_type_traits<_Value_type>::_Format_base_type_id == _Double_type)
2457  {
2458  _Bits_per_channel = _Short_vector_type_traits<_Value_type>::_Default_bits_per_channel;
2459  }
2460 
2461  std::array<size_t, 3> _Dimensions = Concurrency::graphics::details::_Get_dimensions(this->_M_extent, /*_Mip_offset=*/0);
2462 
2463  // release the old texture first before allocating new one to avoid the chance on hitting OOM
2465  _Texture_ptr _Tex_ptr = NULL;
2466 
2467  // See if we need to allocate a staging texture
2468  if (_Should_create_staging_texture(_Av, _Associated_av)) {
2469 
2471  {
2472  throw runtime_exception("Creating staging textures with mipmap levels > 1 is not supported", E_INVALIDARG);
2473  }
2474 
2475  _Tex_ptr = _Texture::_Create_stage_texture(
2476  _Associated_av, _Av, _Rank, _Dimensions[0], _Dimensions[1], _Dimensions[2], this->_M_texture_descriptor._Get_view_mipmap_levels(),
2477  _Short_vector_type_traits<_Value_type>::_Format_base_type_id == _Double_type ? _Uint_type : _Short_vector_type_traits<_Value_type>::_Format_base_type_id,
2478  _Short_vector_type_traits<_Value_type>::_Num_channels,
2479  _Bits_per_channel);
2480 
2481  // Now map the texture
2482  _Tex_ptr->_Map_buffer(_Write_access, true /* _Wait */);
2483  }
2484  else {
2485  _Tex_ptr = _Texture::_Create_texture(_Av, _Rank, _Dimensions[0], _Dimensions[1], _Dimensions[2], this->_M_texture_descriptor._Get_view_mipmap_levels(),
2486  _Short_vector_type_traits<_Value_type>::_Format_base_type_id == _Double_type ? _Uint_type : _Short_vector_type_traits<_Value_type>::_Format_base_type_id,
2487  _Short_vector_type_traits<_Value_type>::_Num_channels,
2488  _Bits_per_channel);
2489  }
2490 
2491  this->_M_texture_descriptor._Set_texture_ptr(_Tex_ptr);
2492 #pragma warning( pop )
2493  }
#define NULL
Definition: vcruntime.h:236
details::_Reference_counted_obj_ptr< details::_Texture > _Texture_ptr
Definition: amprt.h:309
std::array< size_t, 3 > _Get_dimensions(const Concurrency::extent< _Rank > &_Ext, unsigned int _Mip_offset)
Definition: amp_graphics.h:298
Definition: amprt.h:293
unsigned int _Get_view_mipmap_levels() const __GPU
Definition: amprt.h:664
void _Set_texture_ptr(_In_opt_ _Texture *_Texture_ptr) __CPU_ONLY
Definition: amprt.h:674
void _Is_valid_data_length(unsigned int _Num_elems, unsigned int _Bits_per_elem)
Definition: amp_graphics.h:596
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
Concurrency::extent< _Rank > _M_extent
Definition: amp_graphics.h:592
Definition: amprt.h:298
Definition: amprt.h:92
bool _Should_create_staging_texture(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av)
Definition: amp_graphics.h:2423
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
unsigned int  _Bits_per_scalar_element 
)
inlineprivate
2496  {
2497  _Initialize(_Av, _Av, _Bits_per_scalar_element);
2498  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inlineprivate
2501  {
2502  _Initialize(_Av, _Associated_av, Concurrency::graphics::details::_Get_default_bits_per_scalar_element<_Value_type>());
2503  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av)
inlineprivate
2506  {
2507  _Initialize(_Av, _Av);
2508  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
template<typename _Input_iterator >
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inlineprivate
2512  {
2513  _Initialize(_Av, _Associated_av);
2514 
2517  this->get_data_length());
2518 
2519  Concurrency::graphics::details::_Copy_async_impl(_Src_first, _Src_last, *this, index<_Rank>(), this->extent)._Get();
2520 
2522  }
unsigned int get_data_length() const __CPU_ONLY
Definition: amp_graphics.h:493
_AMPIMP void _Get()
Wait until the _Event completes and throw any exceptions that occur.
_AMPIMP _Ret_ _Amp_runtime_trace *__cdecl _Get_amp_trace()
Definition: type_traits:974
_Event _Copy_async_impl(const void *_Src, unsigned int _Src_byte_size, const _Texture_base< _Value_type, _Rank > &_Dst, const index< _Rank > &_Offset, const Concurrency::extent< _Rank > &_Copy_extent)
Definition: amp_graphics.h:3954
_AMPIMP ULONG _Start_copy_event_helper(const _Buffer_descriptor &_Src, const _Buffer_descriptor &_Dest, ULONGLONG _Num_bytes_for_copy)
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
const _Texture_descriptor & _Get_texture_descriptor(const _Texture_type &_Tex) __GPU
Definition: xxamp.h:1094
_AMPIMP void _Write_end_event(ULONG _Span_id)
template<typename _Value_type, int _Rank>
template<typename _Input_iterator >
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
_Input_iterator  _Src_first,
_Input_iterator  _Src_last 
)
inlineprivate
2526  {
2527  _Initialize(_Av, _Av, _Src_first, _Src_last);
2528  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inlineprivate
2531  {
2532  _Initialize(_Av, _Associated_av, _Bits_per_scalar_element);
2533  Concurrency::graphics::copy(_Source, _Src_byte_size, *this);
2534  }
void copy(const _Src_type &_Src, _Out_ void *_Dst, unsigned int _Dst_byte_size)
Copies the contents of the source texture into the destination host buffer.
Definition: amp_graphics.h:4136
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const void _Source,
unsigned int  _Src_byte_size,
unsigned int  _Bits_per_scalar_element 
)
inlineprivate
2537  {
2538  _Initialize(_Av, _Av, _Source, _Src_byte_size, _Bits_per_scalar_element);
2539  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av,
const void _Source,
unsigned int  _Src_byte_size 
)
inlineprivate
2542  {
2543  _Initialize(_Av, _Associated_av);
2544  Concurrency::graphics::copy(_Source, _Src_byte_size, *this);
2545  }
void copy(const _Src_type &_Src, _Out_ void *_Dst, unsigned int _Dst_byte_size)
Copies the contents of the source texture into the destination host buffer.
Definition: amp_graphics.h:4136
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const void _Source,
unsigned int  _Src_byte_size 
)
inlineprivate
2548  {
2549  _Initialize(_Av, _Av, _Source, _Src_byte_size);
2550  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av,
const details::_Texture_base< _Value_type, _Rank > &  _Src 
)
inlineprivate
2553  {
2554  if (_Src.bits_per_scalar_element != 0) // _Src is not created via interop
2555  {
2556  _Initialize(_Av, _Associated_av, _Src.bits_per_scalar_element);
2557  }
2558  else // _Src is created via interop, create a new texture with the same properties as the existing one.
2559  {
2560  _Texture_ptr _New_tex;
2561  if (_Should_create_staging_texture(_Av, _Associated_av))
2562  {
2563  _New_tex = _Texture::_Clone_texture(concurrency::details::_Get_texture(_Src), _Associated_av, _Av);
2564  }
2565  else
2566  {
2567  _New_tex = _Texture::_Clone_texture(concurrency::details::_Get_texture(_Src), _Av, _Associated_av);
2568  }
2569  this->_M_texture_descriptor._Set_texture_ptr(_New_tex);
2570  }
2571 
2574  this->get_data_length());
2575 
2576  Concurrency::graphics::details::_Copy_async_impl(_Src, index<_Rank>(), *this, index<_Rank>(), this->extent)._Get();
2577 
2579  }
details::_Reference_counted_obj_ptr< details::_Texture > _Texture_ptr
Definition: amprt.h:309
_Ret_ _Texture * _Get_texture(const _Texture_type &_Tex) __CPU_ONLY
Definition: xxamp.h:1100
unsigned int get_data_length() const __CPU_ONLY
Definition: amp_graphics.h:493
_AMPIMP void _Get()
Wait until the _Event completes and throw any exceptions that occur.
_AMPIMP _Ret_ _Amp_runtime_trace *__cdecl _Get_amp_trace()
Definition: type_traits:974
_Event _Copy_async_impl(const void *_Src, unsigned int _Src_byte_size, const _Texture_base< _Value_type, _Rank > &_Dst, const index< _Rank > &_Offset, const Concurrency::extent< _Rank > &_Copy_extent)
Definition: amp_graphics.h:3954
_AMPIMP ULONG _Start_copy_event_helper(const _Buffer_descriptor &_Src, const _Buffer_descriptor &_Dest, ULONGLONG _Num_bytes_for_copy)
void _Set_texture_ptr(_In_opt_ _Texture *_Texture_ptr) __CPU_ONLY
Definition: amprt.h:674
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
bool _Should_create_staging_texture(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av)
Definition: amp_graphics.h:2423
const _Texture_descriptor & _Get_texture_descriptor(const _Texture_type &_Tex) __GPU
Definition: xxamp.h:1094
_AMPIMP void _Write_end_event(ULONG _Span_id)
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::_Initialize ( const Concurrency::accelerator_view _Av,
const details::_Texture_base< _Value_type, _Rank > &  _Src 
)
inlineprivate
2582  {
2583  _Initialize(_Av, _Av, _Src);
2584  }
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
bool Concurrency::graphics::texture< _Value_type, _Rank >::_Should_create_staging_texture ( const Concurrency::accelerator_view _Av,
const Concurrency::accelerator_view _Associated_av 
)
inlineprivate
2424  {
2425  return (_Is_cpu_accelerator(_Av.accelerator) && !_Is_cpu_accelerator(_Associated_av.accelerator));
2426  }
friend class accelerator
Definition: amprt.h:1444
bool _Is_cpu_accelerator(const accelerator &_Accl)
Definition: amprt.h:3401
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::copy_to ( texture< _Value_type, _Rank > &  _Dest) const
inline

Copy-to, deep copy

Parameters
_DestThe destination texture to copy to.
2183  {
2184  if (this->extent != _Dest.extent)
2185  {
2186  throw runtime_exception("The source and destination textures must have the exactly the same extent.", E_INVALIDARG);
2187  }
2188 
2191  this->get_data_length());
2192 
2193  this->_Copy_to(_Dest);
2194 
2196  }
void _Copy_to(const _Texture_base &_Dest) const __CPU_ONLY
Definition: amp_graphics.h:558
unsigned int get_data_length() const __CPU_ONLY
Definition: amp_graphics.h:493
_AMPIMP _Ret_ _Amp_runtime_trace *__cdecl _Get_amp_trace()
Definition: type_traits:974
_AMPIMP ULONG _Start_copy_event_helper(const _Buffer_descriptor &_Src, const _Buffer_descriptor &_Dest, ULONGLONG _Num_bytes_for_copy)
const _Texture_descriptor & _Get_texture_descriptor(const _Texture_type &_Tex) __GPU
Definition: xxamp.h:1094
_AMPIMP void _Write_end_event(ULONG _Span_id)
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::copy_to ( const writeonly_texture_view< _Value_type, _Rank > &  _Dest) const
inline

Copy-to, deep copy

Parameters
_DestThe destination writeonly_texture_view to copy to.
2207  {
2208  if (this->extent != _Dest.extent)
2209  {
2210  throw runtime_exception("The source and destination textures must have the exactly the same extent.", E_INVALIDARG);
2211  }
2212 
2215  this->get_data_length());
2216 
2217  this->_Copy_to(_Dest);
2218 
2220  }
void _Copy_to(const _Texture_base &_Dest) const __CPU_ONLY
Definition: amp_graphics.h:558
unsigned int get_data_length() const __CPU_ONLY
Definition: amp_graphics.h:493
_AMPIMP _Ret_ _Amp_runtime_trace *__cdecl _Get_amp_trace()
Definition: type_traits:974
_AMPIMP ULONG _Start_copy_event_helper(const _Buffer_descriptor &_Src, const _Buffer_descriptor &_Dest, ULONGLONG _Num_bytes_for_copy)
const _Texture_descriptor & _Get_texture_descriptor(const _Texture_type &_Tex) __GPU
Definition: xxamp.h:1094
_AMPIMP void _Write_end_event(ULONG _Span_id)
template<typename _Value_type, int _Rank>
_Ret_ void* Concurrency::graphics::texture< _Value_type, _Rank >::data ( )
inline

Returns a CPU pointer to the raw data of this texture.

2363  {
2364  return this->_Get_texture()->_Get_host_ptr();
2365  }
_Ret_ void * _Get_host_ptr() const
Definition: amprt.h:2019
_Ret_ _Texture * _Get_texture() const __CPU_ONLY
Definition: amp_graphics.h:576
template<typename _Value_type, int _Rank>
const void* Concurrency::graphics::texture< _Value_type, _Rank >::data ( ) const
inline

Returns a CPU pointer to the raw data of this texture.

2371  {
2372  return this->_Get_texture()->_Get_host_ptr();
2373  }
_Ret_ void * _Get_host_ptr() const
Definition: amprt.h:2019
_Ret_ _Texture * _Get_texture() const __CPU_ONLY
Definition: amp_graphics.h:576
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::get ( const index< _Rank > &  _Index) const
inline

Get the element value indexed by _Index.

Parameters
_IndexThe index.
Returns
The element value indexed by _Index.
2338  {
2339  return (*this)[_Index];
2340  }
template<typename _Value_type, int _Rank>
__declspec (property(get=get_associated_accelerator_view)) Concurrency Concurrency::accelerator_view Concurrency::graphics::texture< _Value_type, _Rank >::get_associated_accelerator_view ( ) const
inline

Returns the accelerator_view that is the preferred target where this texture can be copied.

2412  {
2413  return this->_Get_texture()->_Get_accelerator_view();
2414  }
_AMPIMP accelerator_view _Get_accelerator_view() const
_Ret_ _Texture * _Get_texture() const __CPU_ONLY
Definition: amp_graphics.h:576
template<typename _Value_type, int _Rank>
unsigned int Concurrency::graphics::texture< _Value_type, _Rank >::get_depth_pitch ( ) const
inline
2397  {
2398  static_assert(_Rank == 3, "depth_pitch is only applicable to staging textures with rank 3.");
2399 
2400  if (!this->_Get_texture()->_Is_staging()) {
2401  throw runtime_exception("depth_pitch is only applicable to staging textures.", E_INVALIDARG);
2402  }
2403 
2404  return static_cast<unsigned int>(this->_Get_texture()->_Get_depth_pitch());
2405  }
size_t _Get_depth_pitch() const
Definition: amprt.h:2321
_Ret_ _Texture * _Get_texture() const __CPU_ONLY
Definition: amp_graphics.h:576
template<typename _Value_type, int _Rank>
unsigned int Concurrency::graphics::texture< _Value_type, _Rank >::get_row_pitch ( ) const
inline
2381  {
2382  static_assert(_Rank >= 2, "row_pitch is only applicable to staging textures with rank 2 or higher.");
2383 
2384  if (!this->_Get_texture()->_Is_staging()) {
2385  throw runtime_exception("row_pitch is only applicable to staging textures.", E_INVALIDARG);
2386  }
2387 
2388  return static_cast<unsigned int>(this->_Get_texture()->_Get_row_pitch());
2389  }
size_t _Get_row_pitch() const
Definition: amprt.h:2311
_Ret_ _Texture * _Get_texture() const __CPU_ONLY
Definition: amp_graphics.h:576
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator() ( const index< _Rank > &  _Index) const
inline

Get the element value indexed by _Index.

Parameters
_IndexThe index.
Returns
The element value indexed by _Index.
2270  {
2271  return (*this)[_Index];
2272  }
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator() ( int  _I0) const
inline

Get the element value indexed by _I0

Parameters
_I0The index.
Returns
The element value indexed by _I0.
2284  {
2285  static_assert(_Rank == 1, "value_type texture::operator()(int) is only permissible on texture<value_type, 1>.");
2286  return (*this)[index<1>(_I0)];
2287  }
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator() ( int  _I0,
int  _I1 
) const
inline

Get the element value indexed by (_I0,_I1)

Parameters
_I0The most-significant component of the index
_I1The least-significant component of the index
Returns
The element value indexed by (_I0,_I1)
2302  {
2303  static_assert(_Rank == 2, "value_type texture::operator()(int, int) is only permissible on texture<value_type, 2>.");
2304  return (*this)[index<2>(_I0, _I1)];
2305  }
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator() ( int  _I0,
int  _I1,
int  _I2 
) const
inline

Get the element value indexed by (_I0,_I1,_I2)

Parameters
_I0The most-significant component of the index
_I1The next-to-most-significant component of the index
_I2The least-significant component of the index
Returns
The element value indexed by (_I0,_I1,_I2)
2323  {
2324  static_assert(_Rank == 3, "value_type texture::operator()(int, int, int) is only permissible on texture<value_type, 3>.");
2325  return (*this)[index<3>(_I0, _I1, _I2)];
2326  }
template<typename _Value_type, int _Rank>
texture& Concurrency::graphics::texture< _Value_type, _Rank >::operator= ( const texture< _Value_type, _Rank > &  _Other)
inline

Copy assignment operator. Deep copy

Parameters
_SrcThe texture to copy from.
Returns
A reference to this texture.
2144  {
2145  if (this != &_Other)
2146  {
2147  this->_M_extent = _Other._M_extent;
2148  this->_M_texture_descriptor._Set_view_mipmap_levels(_Other.get_mipmap_levels());
2149  _Initialize(_Other.accelerator_view, _Other.associated_accelerator_view, _Other);
2150  }
2151  return *this;
2152  }
void _Set_view_mipmap_levels(unsigned int _View_mipmap_levels) __CPU_ONLY
Definition: amprt.h:669
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
Concurrency::extent< _Rank > _M_extent
Definition: amp_graphics.h:592
void _Initialize(const Concurrency::accelerator_view &_Av, const Concurrency::accelerator_view &_Associated_av, unsigned int _Bits_per_scalar_element) __CPU_ONLY
Definition: amp_graphics.h:2428
template<typename _Value_type, int _Rank>
texture& Concurrency::graphics::texture< _Value_type, _Rank >::operator= ( texture< _Value_type, _Rank > &&  _Other)
inline

Move assignment operator

Parameters
_OtherThe source texture to move from.
Returns
A reference to this texture.
2164  {
2165  if (this != &_Other)
2166  {
2167  this->_M_extent = _Other._M_extent;
2168  this->_M_texture_descriptor = _Other._M_texture_descriptor;
2169 
2170  _Other._M_texture_descriptor._M_data_ptr = NULL;
2171  _Other._M_texture_descriptor._Set_texture_ptr(NULL);
2172  }
2173  return *this;
2174  }
#define NULL
Definition: vcruntime.h:236
IUnknown * _M_data_ptr
Definition: amprt.h:558
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
Concurrency::extent< _Rank > _M_extent
Definition: amp_graphics.h:592
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator[] ( const index< _Rank > &  _Index) const
inline

Get the element value indexed by _Index.

Parameters
_IndexThe index.
Returns
The element value indexed by _Index.
2239  {
2240  typename details::_Texture_base<_Value_type, _Rank>::value_type _Tmp;
2241  _Texture_read_helper<index<_Rank>, _Rank>::func(this->_M_texture_descriptor._M_data_ptr, &_Tmp, _Index, /*_Mip_level=*/0);
2242  return _Tmp;
2243  }
IUnknown * _M_data_ptr
Definition: amprt.h:558
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
template<typename _Value_type, int _Rank>
const _Value_type Concurrency::graphics::texture< _Value_type, _Rank >::operator[] ( int  _I0) const
inline

Get the element value indexed by _I.

Parameters
_IThe index.
Returns
The element value indexed by _I.
2255  {
2256  static_assert(_Rank == 1, "value_type texture::operator[](int) is only permissible on texture<value_type, 1>.");
2257  return (*this)[index<1>(_I0)];
2258  }
template<typename _Value_type, int _Rank>
void Concurrency::graphics::texture< _Value_type, _Rank >::set ( const index< _Rank > &  _Index,
const _Value_type &  _Value 
)
inline

Set the element indexed by _Index with value _Value.

Parameters
_IndexThe index.
_ValueThe value to be set to the element indexed by _Index.
2352  {
2353  static_assert(_Short_vector_type_traits<_Value_type>::_Num_channels == 1, "Invalid value_type for set method.");
2354  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Unorm_type, "Invalid value_type for set method.");
2355  static_assert(_Short_vector_type_traits<_Value_type>::_Format_base_type_id != _Norm_type, "Invalid value_type for set method.");
2357  }
Definition: amprt.h:297
IUnknown * _M_data_ptr
Definition: amprt.h:558
_Texture_descriptor _M_texture_descriptor
Definition: amp_graphics.h:593
_In_ int _Value
Definition: setjmp.h:173
Definition: amprt.h:296

Friends And Related Function Documentation

template<typename _Value_type, int _Rank>
template<typename _Value_type , int _Rank>
texture<_Value_type,_Rank> direct3d::make_texture ( const Concurrency::accelerator_view _Av,
_In_ IUnknown *  _D3D_texture,
DXGI_FORMAT  _View_format 
)
friend

The documentation for this class was generated from the following file: