Module notzed.zcl
Package au.notzed.zcl

Class CLExtendable

java.lang.Object
api.Native
au.notzed.zcl.CLObject
au.notzed.zcl.CLExtendable
Direct Known Subclasses:
CLCommandQueue, CLContext, CLDevice

public abstract class CLExtendable
extends CLObject
Extendable object. These keep track of the platform and api revision to be able to lookup extension pointers efficiently.
  • Field Details

  • Constructor Details

    • CLExtendable

      public CLExtendable​(jdk.incubator.foreign.MemoryAddress p)
  • Method Details

    • initPlatform

      protected abstract CLPlatform initPlatform()
      Retrieve the platform. This should not cache the lookup. It cannot return null by definition. This should not be called by any implementing class.
      Returns:
    • getPlatform

      public CLPlatform getPlatform()
    • getAPIVersion

      public int getAPIVersion()
    • requireAPIVersion

      public void requireAPIVersion​(int version) throws java.lang.UnsupportedOperationException
      Throws:
      java.lang.UnsupportedOperationException
    • haveAPIVersion

      public boolean haveAPIVersion​(int version)
    • getExtension

      protected <T extends CLExtension> T getExtension​(java.lang.Class<T> klass, int id)
      Retrieve an extension interface for this object.Used by implementors of CLExtenable.
      Type Parameters:
      T -
      Parameters:
      klass -
      id - The extension id code on CLPlatform.
      Returns: