Module notzed.zcl
Package au.notzed.zcl

Interface CLProperty

All Known Subinterfaces:
CLContextProperty, CLDeviceProperty, CLPipeProperty, CLQueueProperty, CLSamplerProperty
All Known Implementing Classes:
CLContextProperty.TagValue, CLDeviceProperty.PartitionByCounts, CLDeviceProperty.TagValue, CLPipeProperty.TagValue, CLProperty.TagValue, CLQueueProperty.TagValue, CLSamplerProperty.TagValue

public interface CLProperty
All property arrays implement this interface.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Interface Description
    static class  CLProperty.TagValue
    A simple tag/value property type.
  • Method Summary

    Modifier and Type Method Description
    static <T extends CLProperty>
    T[]
    fromNative​(jdk.incubator.foreign.MemorySegment seg, java.util.function.BiFunction<java.lang.Long,​java.lang.Long,​T> create, java.util.function.IntFunction<T[]> createArray)  
    int getSize()  
    static <T extends CLProperty>
    int
    getSize​(T[] props)
    Returns the number of intptr_t values to encode the property array.
    int toInt​(jdk.incubator.foreign.MemoryAddress dst, int o)
    Encode this property as an integer array.
    int toLong​(jdk.incubator.foreign.MemoryAddress dst, int o)
    Encode this property as a long poke.
    static <T extends CLProperty>
    jdk.incubator.foreign.MemoryAddress
    toNative​(Allocator frame, T[] properties)  
  • Method Details

    • getSize

      int getSize()
    • toInt

      int toInt​(jdk.incubator.foreign.MemoryAddress dst, int o)
      Encode this property as an integer array.
      Parameters:
      dst - destination
      o - offset
      Returns:
      updated o = (o + getSize())
    • toLong

      int toLong​(jdk.incubator.foreign.MemoryAddress dst, int o)
      Encode this property as a long poke.
      Parameters:
      dst - destination
      o - offset
      Returns:
      updated o = (o + getSize()))
    • getSize

      static <T extends CLProperty> int getSize​(T[] props)
      Returns the number of intptr_t values to encode the property array.
      Parameters:
      props -
      Returns:
    • toNative

      static <T extends CLProperty> jdk.incubator.foreign.MemoryAddress toNative​(Allocator frame, T[] properties)
    • fromNative

      static <T extends CLProperty> T[] fromNative​(jdk.incubator.foreign.MemorySegment seg, java.util.function.BiFunction<java.lang.Long,​java.lang.Long,​T> create, java.util.function.IntFunction<T[]> createArray)