Top Description Inners Fields Constructors Methods
com.jogamp.opencl

public final Class CLImageFormat

extends Object
Class Inheritance
Imports
com.jogamp.opencl.llb.impl.CLImageFormatImpl

Represents the OpenCL image format with its channeltype and order.
Author
Michael Bien
See Also
CLContext#getSupportedImage2dFormats(com.jogamp.opencl.CLMemory.Mem[]), CLContext#getSupportedImage3dFormats(com.jogamp.opencl.CLMemory.Mem[])

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
CLImageFormat.ChannelOrder

Specifies the number of channels and the channel layout i.e. the memory layout in which channels are stored in the image.

public static enum
CLImageFormat.ChannelType

Describes the size of the channel data type.

Field Summary

Modifier and TypeField and Description
private final CLImageFormatImpl

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public CLImageFormatImpl
getFormatImpl()

Returns the struct accessor for the cl_image_format struct.

public CLImageFormat.ChannelType
public CLImageFormat.ChannelOrder
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public CLImageFormat
public CLImageFormat
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

formatback to summary
private final CLImageFormatImpl format

Constructor Detail

CLImageFormatback to summary
pack-priv CLImageFormat()
CLImageFormatback to summary
pack-priv CLImageFormat(final CLImageFormatImpl format)
CLImageFormatback to summary
public CLImageFormat(final CLImageFormat.ChannelOrder order, final CLImageFormat.ChannelType type)

Method Detail

equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getFormatImplback to summary
public CLImageFormatImpl getFormatImpl()

Returns the struct accessor for the cl_image_format struct.

getImageChannelDataTypeback to summary
public CLImageFormat.ChannelType getImageChannelDataType()
getImageChannelOrderback to summary
public CLImageFormat.ChannelOrder getImageChannelOrder()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
setImageChannelDataTypeback to summary
public CLImageFormat setImageChannelDataType(final CLImageFormat.ChannelType type)
setImageChannelOrderback to summary
public CLImageFormat setImageChannelOrder(final CLImageFormat.ChannelOrder order)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
com.jogamp.opencl back to summary

public final Enum CLImageFormat.ChannelOrder

extends Enum<CLImageFormat.ChannelOrder>
Class Inheritance

Specifies the number of channels and the channel layout i.e. the memory layout in which channels are stored in the image.

Field Summary

Modifier and TypeField and Description
public static final CLImageFormat.ChannelOrder
A

public static final CLImageFormat.ChannelOrder
ARGB

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#SNORM_INT8, ChannelType#SIGNED_INT8 or ChannelType#UNSIGNED_INT8.

public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder
INTENSITY

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#UNORM_INT16, ChannelType#SNORM_INT8, ChannelType#SNORM_INT16, ChannelType#HALF_FLOAT, or ChannelType#FLOAT.

public static final CLImageFormat.ChannelOrder
LUMINANCE

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#UNORM_INT16, ChannelType#SNORM_INT8, ChannelType#SNORM_INT16, ChannelType#HALF_FLOAT, or ChannelType#FLOAT.

public final int
ORDER

Value of wrapped OpenCL flag.

public static final CLImageFormat.ChannelOrder
R

public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder
RGB

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_SHORT_565, ChannelType#UNORM_SHORT_555 or ChannelType#UNORM_INT_101010.

public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder
public static final CLImageFormat.ChannelOrder

Constructor Summary

AccessConstructor and Description
private
ChannelOrder(final int order)

Method Summary

Modifier and TypeMethod and Description
public static CLImageFormat.ChannelOrder
public static CLImageFormat.ChannelOrder
valueOf(final int orderFlag)

public static CLImageFormat.ChannelOrder[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

Aback to summary
public static final CLImageFormat.ChannelOrder A
ARGBback to summary
public static final CLImageFormat.ChannelOrder ARGB

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#SNORM_INT8, ChannelType#SIGNED_INT8 or ChannelType#UNSIGNED_INT8.

BGRAback to summary
public static final CLImageFormat.ChannelOrder BGRA
See Also
ARGB
INTENSITYback to summary
public static final CLImageFormat.ChannelOrder INTENSITY

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#UNORM_INT16, ChannelType#SNORM_INT8, ChannelType#SNORM_INT16, ChannelType#HALF_FLOAT, or ChannelType#FLOAT.

LUMINANCEback to summary
public static final CLImageFormat.ChannelOrder LUMINANCE

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_INT8, ChannelType#UNORM_INT16, ChannelType#SNORM_INT8, ChannelType#SNORM_INT16, ChannelType#HALF_FLOAT, or ChannelType#FLOAT.

ORDERback to summary
public final int ORDER

Value of wrapped OpenCL flag.

Rback to summary
public static final CLImageFormat.ChannelOrder R
RAback to summary
public static final CLImageFormat.ChannelOrder RA
RGback to summary
public static final CLImageFormat.ChannelOrder RG
RGBback to summary
public static final CLImageFormat.ChannelOrder RGB

This format can only be used if channel data type is one of the following values: ChannelType#UNORM_SHORT_565, ChannelType#UNORM_SHORT_555 or ChannelType#UNORM_INT_101010.

RGBAback to summary
public static final CLImageFormat.ChannelOrder RGBA
RGBxback to summary
public static final CLImageFormat.ChannelOrder RGBx
RGxback to summary
public static final CLImageFormat.ChannelOrder RGx
Rxback to summary
public static final CLImageFormat.ChannelOrder Rx

Constructor Detail

ChannelOrderback to summary
private ChannelOrder(final int order)

Method Detail

valueOfback to summary
public static CLImageFormat.ChannelOrder valueOf(String name)
valueOfback to summary
public static CLImageFormat.ChannelOrder valueOf(final int orderFlag)
valuesback to summary
public static CLImageFormat.ChannelOrder[] values()
com.jogamp.opencl back to summary

public final Enum CLImageFormat.ChannelType

extends Enum<CLImageFormat.ChannelType>
Class Inheritance

Describes the size of the channel data type.

Field Summary

Modifier and TypeField and Description
public static final CLImageFormat.ChannelType
FLOAT

Each channel component is a single precision floating-point value.

public static final CLImageFormat.ChannelType
HALF_FLOAT

Each channel component is a 16-bit half-float value.

public static final CLImageFormat.ChannelType
SIGNED_INT16

Each channel component is an unnormalized signed 16-bit integer value.

public static final CLImageFormat.ChannelType
SIGNED_INT32

Each channel component is an unnormalized signed 32-bit integer value.

public static final CLImageFormat.ChannelType
SIGNED_INT8

Each channel component is an unnormalized signed 8-bit integer value.

public static final CLImageFormat.ChannelType
SNORM_INT16

Each channel component is a normalized signed 16-bit integer value.

public static final CLImageFormat.ChannelType
SNORM_INT8

Each channel component is a normalized signed 8-bit integer value.

public final int
TYPE

Value of wrapped OpenCL flag.

public static final CLImageFormat.ChannelType
UNORM_INT16

Each channel component is a normalized unsigned 16-bit integer value.

public static final CLImageFormat.ChannelType
UNORM_INT8

Each channel component is a normalized unsigned 8-bit integer value.

public static final CLImageFormat.ChannelType
UNORM_INT_101010

Represents a normalized x-10-10-10 4-channel xRGB image.

public static final CLImageFormat.ChannelType
UNORM_SHORT_555

Represents a normalized x-5-5-5 4-channel xRGB image.

public static final CLImageFormat.ChannelType
UNORM_SHORT_565

Represents a normalized 5-6-5 3-channel RGB image.

public static final CLImageFormat.ChannelType
UNSIGNED_INT16

Each channel component is an unnormalized unsigned 16-bit integer value.

public static final CLImageFormat.ChannelType
UNSIGNED_INT32

Each channel component is an unnormalized unsigned 32-bit integer value.

public static final CLImageFormat.ChannelType
UNSIGNED_INT8

Each channel component is an unnormalized unsigned 8-bit integer value.

Constructor Summary

AccessConstructor and Description
private
ChannelType(final int channel)

Method Summary

Modifier and TypeMethod and Description
public static CLImageFormat.ChannelType
public static CLImageFormat.ChannelType
valueOf(final int channelFlag)

public static CLImageFormat.ChannelType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FLOATback to summary
public static final CLImageFormat.ChannelType FLOAT

Each channel component is a single precision floating-point value.

HALF_FLOATback to summary
public static final CLImageFormat.ChannelType HALF_FLOAT

Each channel component is a 16-bit half-float value.

SIGNED_INT16back to summary
public static final CLImageFormat.ChannelType SIGNED_INT16

Each channel component is an unnormalized signed 16-bit integer value.

SIGNED_INT32back to summary
public static final CLImageFormat.ChannelType SIGNED_INT32

Each channel component is an unnormalized signed 32-bit integer value.

SIGNED_INT8back to summary
public static final CLImageFormat.ChannelType SIGNED_INT8

Each channel component is an unnormalized signed 8-bit integer value.

SNORM_INT16back to summary
public static final CLImageFormat.ChannelType SNORM_INT16

Each channel component is a normalized signed 16-bit integer value.

SNORM_INT8back to summary
public static final CLImageFormat.ChannelType SNORM_INT8

Each channel component is a normalized signed 8-bit integer value.

TYPEback to summary
public final int TYPE

Value of wrapped OpenCL flag.

UNORM_INT16back to summary
public static final CLImageFormat.ChannelType UNORM_INT16

Each channel component is a normalized unsigned 16-bit integer value.

UNORM_INT8back to summary
public static final CLImageFormat.ChannelType UNORM_INT8

Each channel component is a normalized unsigned 8-bit integer value.

UNORM_INT_101010back to summary
public static final CLImageFormat.ChannelType UNORM_INT_101010

Represents a normalized x-10-10-10 4-channel xRGB image. The channel order must be ChannelOrder#RGB.

UNORM_SHORT_555back to summary
public static final CLImageFormat.ChannelType UNORM_SHORT_555

Represents a normalized x-5-5-5 4-channel xRGB image. The channel order must be ChannelOrder#RGB.

UNORM_SHORT_565back to summary
public static final CLImageFormat.ChannelType UNORM_SHORT_565

Represents a normalized 5-6-5 3-channel RGB image. The channel order must be ChannelOrder#RGB.

UNSIGNED_INT16back to summary
public static final CLImageFormat.ChannelType UNSIGNED_INT16

Each channel component is an unnormalized unsigned 16-bit integer value.

UNSIGNED_INT32back to summary
public static final CLImageFormat.ChannelType UNSIGNED_INT32

Each channel component is an unnormalized unsigned 32-bit integer value.

UNSIGNED_INT8back to summary
public static final CLImageFormat.ChannelType UNSIGNED_INT8

Each channel component is an unnormalized unsigned 8-bit integer value.

Constructor Detail

ChannelTypeback to summary
private ChannelType(final int channel)

Method Detail

valueOfback to summary
public static CLImageFormat.ChannelType valueOf(String name)
valueOfback to summary
public static CLImageFormat.ChannelType valueOf(final int channelFlag)
valuesback to summary
public static CLImageFormat.ChannelType[] values()