jcuda.jnpp
Class TypedPointer<T extends NppType>

java.lang.Object
  extended by jcuda.NativePointerObject
      extended by jcuda.Pointer
          extended by jcuda.jnpp.TypedPointer<T>
Type Parameters:
T - The type parameter

public class TypedPointer<T extends NppType>
extends jcuda.Pointer

A typed pointer, that is, a usual Pointer that has a type parameter.


Constructor Summary
TypedPointer()
          Creates a new (null) typed pointer.
 
Method Summary
static
<S extends NppType>
TypedPointer<S>
from(jcuda.Pointer pointer)
          Create a new typed pointer from the given Pointer
static
<S extends NppType>
TypedPointer<S>
to(java.nio.ByteBuffer buffer)
          Creates a new typed pointer to the given buffer.
static TypedPointer<Npp16s> to16s(short[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp16u> to16u(short[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp32f> to32f(float[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp32s> to32s(int[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp32u> to32u(int[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp64f> to64f(double[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp64s> to64s(long[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp64u> to64u(long[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp8s> to8s(byte[] array)
          Creates a new typed pointer to the given array
static TypedPointer<Npp8u> to8u(byte[] array)
          Creates a new typed pointer to the given array
 TypedPointer<T> withByteOffset(long byteOffset)
          Returns a new typed pointer with an offset of the given number of bytes
 
Methods inherited from class jcuda.Pointer
getByteBuffer, getByteOffset, to, to, to, to, to, to, to, to, to, toBuffer, toString
 
Methods inherited from class jcuda.NativePointerObject
equals, getNativePointer, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypedPointer

public TypedPointer()
Creates a new (null) typed pointer.

Method Detail

from

public static <S extends NppType> TypedPointer<S> from(jcuda.Pointer pointer)
Create a new typed pointer from the given Pointer

Type Parameters:
S - The type
Parameters:
pointer - The pointer
Returns:
The typed pointer

to

public static <S extends NppType> TypedPointer<S> to(java.nio.ByteBuffer buffer)
Creates a new typed pointer to the given buffer.

Type Parameters:
S - The type
Parameters:
buffer - The buffer
Returns:
The typed pointer

to8u

public static TypedPointer<Npp8u> to8u(byte[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to8s

public static TypedPointer<Npp8s> to8s(byte[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to16u

public static TypedPointer<Npp16u> to16u(short[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to16s

public static TypedPointer<Npp16s> to16s(short[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to32u

public static TypedPointer<Npp32u> to32u(int[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to32s

public static TypedPointer<Npp32s> to32s(int[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to64u

public static TypedPointer<Npp64u> to64u(long[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to64s

public static TypedPointer<Npp64s> to64s(long[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to32f

public static TypedPointer<Npp32f> to32f(float[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

to64f

public static TypedPointer<Npp64f> to64f(double[] array)
Creates a new typed pointer to the given array

Parameters:
array - The array
Returns:
The typed pointer

withByteOffset

public TypedPointer<T> withByteOffset(long byteOffset)
Returns a new typed pointer with an offset of the given number of bytes

Overrides:
withByteOffset in class jcuda.Pointer
Parameters:
byteOffset - The byte offset for the pointer
Returns:
The new typed pointer with the given byte offset