Data Structures | Public Member Functions | Static Public Member Functions
android::RSC::Element Class Reference

#include <rsCppStructs.h>

Inheritance diagram for android::RSC::Element:
android::RSC::BaseObj

Data Structures

class  Builder

Public Member Functions

size_t getSubElementCount ()
sp< const ElementgetSubElement (uint32_t index)
const char * getSubElementName (uint32_t index)
size_t getSubElementArraySize (uint32_t index)
uint32_t getSubElementOffsetBytes (uint32_t index)
RsDataType getDataType () const
RsDataKind getDataKind () const
size_t getSizeBytes () const
uint32_t getVectorSize () const
bool isCompatible (sp< const Element >e) const

Static Public Member Functions

static sp< const ElementBOOLEAN (sp< RS > rs)
static sp< const ElementU8 (sp< RS > rs)
static sp< const ElementI8 (sp< RS > rs)
static sp< const ElementU16 (sp< RS > rs)
static sp< const ElementI16 (sp< RS > rs)
static sp< const ElementU32 (sp< RS > rs)
static sp< const ElementI32 (sp< RS > rs)
static sp< const ElementU64 (sp< RS > rs)
static sp< const ElementI64 (sp< RS > rs)
static sp< const ElementF32 (sp< RS > rs)
static sp< const ElementF64 (sp< RS > rs)
static sp< const ElementELEMENT (sp< RS > rs)
static sp< const ElementTYPE (sp< RS > rs)
static sp< const ElementALLOCATION (sp< RS > rs)
static sp< const ElementSAMPLER (sp< RS > rs)
static sp< const ElementSCRIPT (sp< RS > rs)
static sp< const ElementA_8 (sp< RS > rs)
static sp< const ElementRGB_565 (sp< RS > rs)
static sp< const ElementRGB_888 (sp< RS > rs)
static sp< const ElementRGBA_5551 (sp< RS > rs)
static sp< const ElementRGBA_4444 (sp< RS > rs)
static sp< const ElementRGBA_8888 (sp< RS > rs)
static sp< const ElementF32_2 (sp< RS > rs)
static sp< const ElementF32_3 (sp< RS > rs)
static sp< const ElementF32_4 (sp< RS > rs)
static sp< const ElementF64_2 (sp< RS > rs)
static sp< const ElementF64_3 (sp< RS > rs)
static sp< const ElementF64_4 (sp< RS > rs)
static sp< const ElementU8_2 (sp< RS > rs)
static sp< const ElementU8_3 (sp< RS > rs)
static sp< const ElementU8_4 (sp< RS > rs)
static sp< const ElementI8_2 (sp< RS > rs)
static sp< const ElementI8_3 (sp< RS > rs)
static sp< const ElementI8_4 (sp< RS > rs)
static sp< const ElementU16_2 (sp< RS > rs)
static sp< const ElementU16_3 (sp< RS > rs)
static sp< const ElementU16_4 (sp< RS > rs)
static sp< const ElementI16_2 (sp< RS > rs)
static sp< const ElementI16_3 (sp< RS > rs)
static sp< const ElementI16_4 (sp< RS > rs)
static sp< const ElementU32_2 (sp< RS > rs)
static sp< const ElementU32_3 (sp< RS > rs)
static sp< const ElementU32_4 (sp< RS > rs)
static sp< const ElementI32_2 (sp< RS > rs)
static sp< const ElementI32_3 (sp< RS > rs)
static sp< const ElementI32_4 (sp< RS > rs)
static sp< const ElementU64_2 (sp< RS > rs)
static sp< const ElementU64_3 (sp< RS > rs)
static sp< const ElementU64_4 (sp< RS > rs)
static sp< const ElementI64_2 (sp< RS > rs)
static sp< const ElementI64_3 (sp< RS > rs)
static sp< const ElementI64_4 (sp< RS > rs)
static sp< const ElementYUV (sp< RS > rs)
static sp< const ElementMATRIX_4X4 (sp< RS > rs)
static sp< const ElementMATRIX_3X3 (sp< RS > rs)
static sp< const ElementMATRIX_2X2 (sp< RS > rs)
static sp< const ElementcreateUser (sp< RS > rs, RsDataType dt)
static sp< const ElementcreateVector (sp< RS > rs, RsDataType dt, uint32_t size)
static sp< const ElementcreatePixel (sp< RS > rs, RsDataType dt, RsDataKind dk)

Detailed Description

An Element represents one item within an Allocation. An Element is roughly equivalent to a C type in a RenderScript kernel. Elements may be basic or complex. Some basic elements are:

Basic Elements are comprised of a Element.DataType and a Element.DataKind. The DataType encodes C type information of an Element, while the DataKind encodes how that Element should be interpreted by a Sampler. Note that Allocation objects with DataKind USER cannot be used as input for a Sampler. In general, Allocation objects that are intended for use with a Sampler should use bitmap-derived Elements such as Element::RGBA_8888.

Definition at line 584 of file rsCppStructs.h.


Member Function Documentation

static sp<const Element> android::RSC::Element::A_8 ( sp< RS rs) [static]

Utility function for returning an Element containing an ALPHA_8 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::ALLOCATION ( sp< RS rs) [static]

Utility function for returning an Element containing a single Allocation.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::BOOLEAN ( sp< RS rs) [static]

Utility function for returning an Element containing a single bool.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::createPixel ( sp< RS rs,
RsDataType  dt,
RsDataKind  dk 
) [static]

Create an Element with a given DataType and DataKind.

Parameters:
[in]rsRenderScript context
[in]dtDataType
[in]dkDataKind
Returns:
Element
static sp<const Element> android::RSC::Element::createUser ( sp< RS rs,
RsDataType  dt 
) [static]

Create an Element with a given DataType.

Parameters:
[in]rsRenderScript context
[in]dtdata type
Returns:
Element
static sp<const Element> android::RSC::Element::createVector ( sp< RS rs,
RsDataType  dt,
uint32_t  size 
) [static]

Create a vector Element with the given DataType

Parameters:
[in]rsRenderScript
[in]dtDataType
[in]sizevector size
Returns:
Element
static sp<const Element> android::RSC::Element::ELEMENT ( sp< RS rs) [static]

Utility function for returning an Element containing a single Element.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F32 ( sp< RS rs) [static]

Utility function for returning an Element containing a single float.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F32_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a float2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F32_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a float3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F32_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a float4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F64 ( sp< RS rs) [static]

Utility function for returning an Element containing a single double.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F64_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a double2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F64_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a double3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::F64_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a double4.

Parameters:
[in]rsRenderScript context
Returns:
Element
RsDataKind android::RSC::Element::getDataKind ( ) const [inline]

Returns the data kind used for the Element.

Returns:
data kind

Definition at line 641 of file rsCppStructs.h.

RsDataType android::RSC::Element::getDataType ( ) const [inline]

Returns the data type used for the Element.

Returns:
data type

Definition at line 633 of file rsCppStructs.h.

size_t android::RSC::Element::getSizeBytes ( ) const [inline]

Returns the size in bytes of the Element.

Returns:
size in bytes

Definition at line 649 of file rsCppStructs.h.

sp<const Element> android::RSC::Element::getSubElement ( uint32_t  index)

For complex Elements, this returns the sub-element at a given index.

Parameters:
[in]indexindex of sub-element
Returns:
sub-element
size_t android::RSC::Element::getSubElementArraySize ( uint32_t  index)

For complex Elements, this returns the size of the sub-element at a given index.

Parameters:
[in]indexindex of sub-element
Returns:
size of sub-element
size_t android::RSC::Element::getSubElementCount ( ) [inline]

Elements could be simple, such as an int or a float, or a structure with multiple sub-elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.

Returns:
number of sub-elements

Definition at line 595 of file rsCppStructs.h.

const char* android::RSC::Element::getSubElementName ( uint32_t  index)

For complex Elements, this returns the name of the sub-element at a given index.

Parameters:
[in]indexindex of sub-element
Returns:
name of sub-element
uint32_t android::RSC::Element::getSubElementOffsetBytes ( uint32_t  index)

Returns the location of a sub-element within a complex Element.

Parameters:
[in]indexindex of sub-element
Returns:
offset in bytes
uint32_t android::RSC::Element::getVectorSize ( ) const [inline]

Returns the number of vector components for this Element.

Returns:
number of vector components

Definition at line 657 of file rsCppStructs.h.

static sp<const Element> android::RSC::Element::I16 ( sp< RS rs) [static]

Utility function for returning an Element containing a single signed short.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I16_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a short2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I16_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a short3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I16_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a short4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I32 ( sp< RS rs) [static]

Utility function for returning an Element containing a single signed int.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I32_2 ( sp< RS rs) [static]

Utility function for returning an Element containing an int2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I32_3 ( sp< RS rs) [static]

Utility function for returning an Element containing an int3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I32_4 ( sp< RS rs) [static]

Utility function for returning an Element containing an int4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I64 ( sp< RS rs) [static]

Utility function for returning an Element containing a single signed long long.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I64_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a long2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I64_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a long3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I64_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a long4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I8 ( sp< RS rs) [static]

Utility function for returning an Element containing a single signed char.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I8_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a char2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I8_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a char3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::I8_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a char4.

Parameters:
[in]rsRenderScript context
Returns:
Element
bool android::RSC::Element::isCompatible ( sp< const Element e) const

Returns true if the Element can interoperate with this Element.

Parameters:
[in]eElement to compare
Returns:
true if Elements can interoperate
static sp<const Element> android::RSC::Element::MATRIX_2X2 ( sp< RS rs) [static]

Utility function for returning an Element containing an rs_matrix_2x2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::MATRIX_3X3 ( sp< RS rs) [static]

Utility function for returning an Element containing an rs_matrix_3x3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::MATRIX_4X4 ( sp< RS rs) [static]

Utility function for returning an Element containing an rs_matrix_4x4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::RGB_565 ( sp< RS rs) [static]

Utility function for returning an Element containing an RGB_565 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::RGB_888 ( sp< RS rs) [static]

Utility function for returning an Element containing an RGB_888 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::RGBA_4444 ( sp< RS rs) [static]

Utility function for returning an Element containing an RGBA_4444 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::RGBA_5551 ( sp< RS rs) [static]

Utility function for returning an Element containing an RGBA_5551 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::RGBA_8888 ( sp< RS rs) [static]

Utility function for returning an Element containing an RGBA_8888 pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::SAMPLER ( sp< RS rs) [static]

Utility function for returning an Element containing a single Sampler.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::SCRIPT ( sp< RS rs) [static]

Utility function for returning an Element containing a single Script.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::TYPE ( sp< RS rs) [static]

Utility function for returning an Element containing a single Type.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U16 ( sp< RS rs) [static]

Utility function for returning an Element containing a single unsigned short.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U16_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a ushort2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U16_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a ushort3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U16_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a ushort4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U32 ( sp< RS rs) [static]

Utility function for returning an Element containing a single unsigned int.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U32_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a uint2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U32_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a uint3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U32_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a uint4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U64 ( sp< RS rs) [static]

Utility function for returning an Element containing a single unsigned long long.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U64_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a ulong2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U64_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a ulong3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U64_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a ulong4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U8 ( sp< RS rs) [static]

Utility function for returning an Element containing a single unsigned char.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U8_2 ( sp< RS rs) [static]

Utility function for returning an Element containing a uchar2.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U8_3 ( sp< RS rs) [static]

Utility function for returning an Element containing a uchar3.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::U8_4 ( sp< RS rs) [static]

Utility function for returning an Element containing a uchar4.

Parameters:
[in]rsRenderScript context
Returns:
Element
static sp<const Element> android::RSC::Element::YUV ( sp< RS rs) [static]

Utility function for returning an Element containing a YUV pixel.

Parameters:
[in]rsRenderScript context
Returns:
Element

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