org.jocl.utils
Class MemInfos

java.lang.Object
  extended by org.jocl.utils.MemInfos

public class MemInfos
extends java.lang.Object

Utility methods for obtaining information about cl_mem objects


Method Summary
static org.jocl.cl_mem getAssociatedMemobject(org.jocl.cl_mem mem)
          The memory object specified as buffer argument to clCreateSubBuffer, or NULL
static org.jocl.cl_context getContext(org.jocl.cl_mem mem)
          The context that this memory object belongs to
static long getFlags(org.jocl.cl_mem mem)
          The flags specified when the memory object was created
static java.lang.String getFlagsString(org.jocl.cl_mem mem)
          The flags specified when the memory object was created
static org.jocl.Pointer getHostPtr(org.jocl.cl_mem mem)
          The host pointer specified when the memory object was created.
static int getMapCount(org.jocl.cl_mem mem)
          The map count - only provided for debugging.
static long getOffset(org.jocl.cl_mem mem)
          If the memory object is a sub-buffer, this is its offset, otherwise it is 0
static int getReferenceCount(org.jocl.cl_mem mem)
          The reference count - only provided for identifying memory leaks.
static long getSize(org.jocl.cl_mem mem)
          Size of the memory object in bytes
static int getType(org.jocl.cl_mem mem)
          The type of the memory object
static java.lang.String getTypeString(org.jocl.cl_mem mem)
          The type of the memory object as a String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getType

public static int getType(org.jocl.cl_mem mem)
The type of the memory object

Parameters:
mem - The mem
Returns:
The value

getTypeString

public static java.lang.String getTypeString(org.jocl.cl_mem mem)
The type of the memory object as a String

Parameters:
mem - The mem
Returns:
The value

getFlags

public static long getFlags(org.jocl.cl_mem mem)
The flags specified when the memory object was created

Parameters:
mem - The mem
Returns:
The value

getFlagsString

public static java.lang.String getFlagsString(org.jocl.cl_mem mem)
The flags specified when the memory object was created

Parameters:
mem - The mem
Returns:
The value

getSize

public static long getSize(org.jocl.cl_mem mem)
Size of the memory object in bytes

Parameters:
mem - The mem
Returns:
The value

getHostPtr

public static org.jocl.Pointer getHostPtr(org.jocl.cl_mem mem)
The host pointer specified when the memory object was created.

Parameters:
mem - The mem
Returns:
The value

getMapCount

public static int getMapCount(org.jocl.cl_mem mem)
The map count - only provided for debugging.

Parameters:
mem - The mem
Returns:
The value

getReferenceCount

public static int getReferenceCount(org.jocl.cl_mem mem)
The reference count - only provided for identifying memory leaks.

Parameters:
mem - The mem
Returns:
The value

getContext

public static org.jocl.cl_context getContext(org.jocl.cl_mem mem)
The context that this memory object belongs to

Parameters:
mem - The mem
Returns:
The value

getAssociatedMemobject

public static org.jocl.cl_mem getAssociatedMemobject(org.jocl.cl_mem mem)
The memory object specified as buffer argument to clCreateSubBuffer, or NULL

Parameters:
mem - The mem
Returns:
The value

getOffset

public static long getOffset(org.jocl.cl_mem mem)
If the memory object is a sub-buffer, this is its offset, otherwise it is 0

Parameters:
mem - The mem
Returns:
The value