Class ShadowBuffer


  • public class ShadowBuffer
    extends Object
    • Constructor Detail

      • ShadowBuffer

        public ShadowBuffer​(GPUObject gpuObj)
    • Method Detail

      • isBuffered

        public boolean isBuffered()
        Check if the gpu object is shadow buffered
        Returns:
        true if the gpu object is shadow buffered
      • moveFromDevice

        public void moveFromDevice​(String instName)
        Move the data from GPU to shadow buffer
        Parameters:
        instName - name of the instruction
      • moveToHost

        public void moveToHost()
        Move the data from shadow buffer to Matrix object
      • moveToDevice

        public void moveToDevice()
        Move the data from shadow buffer to GPU
      • isEligibleForBuffering

        public boolean isEligibleForBuffering​(boolean isEviction,
                                              boolean eagerDelete)
        Checks if the GPU object is eligible for shadow buffering
        Parameters:
        isEviction - true if this method is called during eviction
        eagerDelete - true if the data on device has to be eagerly deleted
        Returns:
        true if the given GPU object is eligible to be shadow buffered
      • clearShadowPointer

        public void clearShadowPointer()
        Removes the content from shadow buffer