## Uses of Interface
org.apache.sysds.runtime.controlprogram.caching.CacheBlock

- Packages that use CacheBlock
  Package | Description
  --- | ---
  org.apache.sysds.runtime.compress |
  org.apache.sysds.runtime.controlprogram.caching |
  org.apache.sysds.runtime.controlprogram.context |
  org.apache.sysds.runtime.controlprogram.federated |
  org.apache.sysds.runtime.controlprogram.parfor |
  org.apache.sysds.runtime.data |
  org.apache.sysds.runtime.instructions.fed |
  org.apache.sysds.runtime.instructions.spark.data |
  org.apache.sysds.runtime.matrix.data |
  org.apache.sysds.runtime.transform.encode |
  org.apache.sysds.runtime.util |

- - ### Uses of CacheBlock in org.apache.sysds.runtime.compress

    Classes in org.apache.sysds.runtime.compress that implement CacheBlock
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `CompressedMatrixBlock` |

    Methods in org.apache.sysds.runtime.compress with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `MatrixBlock` | CompressedMatrixBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.controlprogram.caching

    Classes in org.apache.sysds.runtime.controlprogram.caching with type parameters of type CacheBlock
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `CacheableData<T extends CacheBlock>` | Each object of this class is a cache envelope for some large piece of data called "cache block".

    Methods in org.apache.sysds.runtime.controlprogram.caching that return CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `CacheBlock` | ByteBuffer.`deserializeBlock()` |
    `static CacheBlock` | CacheBlockFactory.`newInstance​(int code)` |
    `static CacheBlock` | LazyWriteBuffer.`readBlock​(String fname, boolean matrix)` |
    `static CacheBlock` | UnifiedMemoryManager.`readBlock​(String fname, boolean matrix)` |
    `CacheBlock` | CacheBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock block)` | Slice a sub block out of the current block and write into the given output block.
    `CacheBlock` | CacheBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock block)` | Slice a sub block out of the current block and write into the given output block.

    Methods in org.apache.sysds.runtime.controlprogram.caching with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static long` | LazyWriteBuffer.`getCacheBlockSize​(CacheBlock cb)` |
    `static long` | UnifiedMemoryManager.`getCacheBlockSize​(CacheBlock cb)` |
    `static int` | CacheBlockFactory.`getCode​(CacheBlock block)` |
    `static ArrayList<?>` | CacheBlockFactory.`getPairList​(CacheBlock block)` |
    `static boolean` | CacheableData.`isBelowCachingThreshold​(CacheBlock data)` |
    `static boolean` | ByteBuffer.`isValidCapacity​(long size, CacheBlock cb)` | Determines if byte buffer can hold the given size given this specific cache block.
    `void` | CacheBlock.`merge​(CacheBlock that, boolean appendOnly)` | Merge the given block into the current block.
    `void` | ByteBuffer.`serializeBlock​(CacheBlock cb)` |
    `void` | CacheMaintenanceService.`serializeData​(ByteBuffer bbuff, CacheBlock cb)` |
    `CacheBlock` | CacheBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock block)` | Slice a sub block out of the current block and write into the given output block.
    `CacheBlock` | CacheBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock block)` | Slice a sub block out of the current block and write into the given output block.
    `static int` | LazyWriteBuffer.`writeBlock​(String fname, CacheBlock cb)` |
    `static int` | UnifiedMemoryManager.`writeBlock​(String fname, CacheBlock cb)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.controlprogram.context

    Methods in org.apache.sysds.runtime.controlprogram.context that return types with arguments of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.apache.spark.broadcast.Broadcast<CacheBlock>` | SparkExecutionContext.`broadcastVariable​(CacheableData<CacheBlock> cd)` |

    Methods in org.apache.sysds.runtime.controlprogram.context with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static CacheableData<?>` | ExecutionContext.`createCacheableData​(CacheBlock cb)` |

    Method parameters in org.apache.sysds.runtime.controlprogram.context with type arguments of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `org.apache.spark.broadcast.Broadcast<CacheBlock>` | SparkExecutionContext.`broadcastVariable​(CacheableData<CacheBlock> cd)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.controlprogram.federated

    Methods in org.apache.sysds.runtime.controlprogram.federated with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | FederatedStatistics.`incFedReuseReadBytesCount​(CacheBlock cb)` |
    `Future<FederatedResponse>` | FederatedData.`initFederatedDataFromLocal​(long id, CacheBlock block)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.controlprogram.parfor

    Method parameters in org.apache.sysds.runtime.controlprogram.parfor with type arguments of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | CachedReuseVariables.`reuseVariables​(long pfid, LocalVariableMap vars, Collection<String> excludeList, Map<String,​org.apache.spark.broadcast.Broadcast<CacheBlock>> _brInputs, boolean cleanCache)` |

    Constructor parameters in org.apache.sysds.runtime.controlprogram.parfor with type arguments of type CacheBlock
    Constructor | Description
    --- | ---
    `RemoteParForSparkWorker​(long jobid, String program, boolean isLocal, HashMap<String,​byte[]> clsMap, boolean cpCaching, org.apache.spark.util.LongAccumulator atasks, org.apache.spark.util.LongAccumulator aiters, Map<String,​org.apache.spark.broadcast.Broadcast<CacheBlock>> brInputs, boolean cleanCache, Map<String,​String> lineage)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.data

    Classes in org.apache.sysds.runtime.data that implement CacheBlock
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `TensorBlock` | A `TensorBlock` is the most top level representation of a tensor.

    Methods in org.apache.sysds.runtime.data that return CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `CacheBlock` | TensorBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock block)` |
    `CacheBlock` | TensorBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock block)` |

    Methods in org.apache.sysds.runtime.data with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | TensorBlock.`merge​(CacheBlock that, boolean appendOnly)` |
    `CacheBlock` | TensorBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock block)` |
    `CacheBlock` | TensorBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock block)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.instructions.fed

    Methods in org.apache.sysds.runtime.instructions.fed with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | InitFEDInstruction.`federateFrame​(FrameObject output, List<org.apache.commons.lang3.tuple.Pair<FederatedRange,​FederatedData>> workers, CacheBlock[] blocks)` |
    `static void` | InitFEDInstruction.`federateMatrix​(CacheableData<?> output, List<org.apache.commons.lang3.tuple.Pair<FederatedRange,​FederatedData>> workers, CacheBlock[] blocks)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.instructions.spark.data

    Classes in org.apache.sysds.runtime.instructions.spark.data with type parameters of type CacheBlock
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `BroadcastObject<T extends CacheBlock>` |
    `class` | `PartitionedBlock<T extends CacheBlock>` | This class is for partitioned matrix/frame blocks, to be used as broadcasts.
    `class` | `PartitionedBroadcast<T extends CacheBlock>` | This class is a wrapper around an array of broadcasts of partitioned matrix/frame blocks, which is required due to 2GB limitations of Spark's broadcast handling.

  - ### Uses of CacheBlock in org.apache.sysds.runtime.matrix.data

    Classes in org.apache.sysds.runtime.matrix.data that implement CacheBlock
    Modifier and Type | Class | Description
    --- | --- | ---
    `class` | `FrameBlock` |
    `class` | `MatrixBlock` |

    Methods in org.apache.sysds.runtime.matrix.data with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | FrameBlock.`merge​(CacheBlock that, boolean bDummy)` |
    `void` | MatrixBlock.`merge​(CacheBlock that, boolean appendOnly)` |
    `static List` | OperationsOnMatrixValues.`performSlice​(IndexRange ixrange, int blen, int iix, int jix, CacheBlock in)` | Slice used in broadcasting matrix blocks for spark, since this slice up a given matrix into blocks.
    `FrameBlock` | FrameBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock retCache)` | Right indexing operations to slice a subframe out of this frame block.
    `FrameBlock` | FrameBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock retCache)` |
    `MatrixBlock` | MatrixBlock.`slice​(int rl, int ru, int cl, int cu, boolean deep, CacheBlock ret)` | Method to perform rightIndex operation for a given lower and upper bounds in row and column dimensions.
    `MatrixBlock` | MatrixBlock.`slice​(int rl, int ru, int cl, int cu, CacheBlock ret)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.transform.encode

    Methods in org.apache.sysds.runtime.transform.encode with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `MatrixBlock` | ColumnEncoder.`apply​(CacheBlock in, MatrixBlock out, int outputCol)` | Apply Functions are only used in Single Threaded or Multi-Threaded Dense context.
    `MatrixBlock` | ColumnEncoder.`apply​(CacheBlock in, MatrixBlock out, int outputCol, int rowStart, int blk)` |
    `MatrixBlock` | ColumnEncoderComposite.`apply​(CacheBlock in, MatrixBlock out, int outputCol, int rowStart, int blk)` |
    `MatrixBlock` | Encoder.`apply​(CacheBlock in, MatrixBlock out, int outputCol)` | Apply the generated metadata to the FrameBlock and saved the result in out.
    `MatrixBlock` | MultiColumnEncoder.`apply​(CacheBlock in)` |
    `MatrixBlock` | MultiColumnEncoder.`apply​(CacheBlock in, int k)` |
    `MatrixBlock` | MultiColumnEncoder.`apply​(CacheBlock in, MatrixBlock out, int outputCol)` |
    `MatrixBlock` | MultiColumnEncoder.`apply​(CacheBlock in, MatrixBlock out, int outputCol, int k)` |
    `void` | ColumnEncoderUDF.`applyDense​(CacheBlock in, MatrixBlock out, int outputCol, int rowStart, int blk)` |
    `void` | ColumnEncoder.`build​(CacheBlock in, double[] equiHeightMaxs)` |
    `void` | ColumnEncoder.`build​(CacheBlock in, Map<Integer,​double[]> equiHeightMaxs)` |
    `void` | ColumnEncoderBin.`build​(CacheBlock in)` |
    `void` | ColumnEncoderBin.`build​(CacheBlock in, double[] equiHeightMaxs)` |
    `void` | ColumnEncoderComposite.`build​(CacheBlock in)` |
    `void` | ColumnEncoderComposite.`build​(CacheBlock in, Map<Integer,​double[]> equiHeightMaxs)` |
    `void` | ColumnEncoderDummycode.`build​(CacheBlock in)` |
    `void` | ColumnEncoderFeatureHash.`build​(CacheBlock in)` |
    `void` | ColumnEncoderPassThrough.`build​(CacheBlock in)` |
    `void` | ColumnEncoderRecode.`build​(CacheBlock in)` |
    `void` | ColumnEncoderUDF.`build​(CacheBlock in)` |
    `void` | Encoder.`build​(CacheBlock in)` | Build the transform meta data for the given block input.
    `void` | MultiColumnEncoder.`build​(CacheBlock in)` |
    `void` | MultiColumnEncoder.`build​(CacheBlock in, int k)` |
    `void` | MultiColumnEncoder.`build​(CacheBlock in, int k, Map<Integer,​double[]> equiHeightBinMaxs)` |
    `void` | ColumnEncoderComposite.`computeRCDMapSizeEstimate​(CacheBlock in, int[] sampleIndices)` |
    `void` | ColumnEncoderRecode.`computeRCDMapSizeEstimate​(CacheBlock in, int[] sampleIndices)` |
    `MatrixBlock` | MultiColumnEncoder.`encode​(CacheBlock in)` |
    `MatrixBlock` | MultiColumnEncoder.`encode​(CacheBlock in, int k)` |
    `List<DependencyTask<?>>` | ColumnEncoder.`getApplyTasks​(CacheBlock in, MatrixBlock out, int outputCol)` |
    `List<DependencyTask<?>>` | ColumnEncoderComposite.`getApplyTasks​(CacheBlock in, MatrixBlock out, int outputCol)` |
    `Callable<Object>` | ColumnEncoder.`getBuildTask​(CacheBlock in)` |
    `Callable<Object>` | ColumnEncoderBin.`getBuildTask​(CacheBlock in)` |
    `Callable<Object>` | ColumnEncoderRecode.`getBuildTask​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoder.`getBuildTasks​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoderComposite.`getBuildTasks​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoderDummycode.`getBuildTasks​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoderFeatureHash.`getBuildTasks​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoderPassThrough.`getBuildTasks​(CacheBlock in)` |
    `List<DependencyTask<?>>` | ColumnEncoderUDF.`getBuildTasks​(CacheBlock in)` |
    `Callable<Object>` | ColumnEncoder.`getPartialBuildTask​(CacheBlock in, int startRow, int blockSize, HashMap<Integer,​Object> ret)` |
    `Callable<Object>` | ColumnEncoderBin.`getPartialBuildTask​(CacheBlock in, int startRow, int blockSize, HashMap<Integer,​Object> ret)` |
    `Callable<Object>` | ColumnEncoderRecode.`getPartialBuildTask​(CacheBlock in, int startRow, int blockSize, HashMap<Integer,​Object> ret)` |

    Constructors in org.apache.sysds.runtime.transform.encode with parameters of type CacheBlock
    Constructor | Description
    --- | ---
    `FeatureHashSparseApplyTask​(ColumnEncoderFeatureHash encoder, CacheBlock input, MatrixBlock out, int outputCol)` |
    `FeatureHashSparseApplyTask​(ColumnEncoderFeatureHash encoder, CacheBlock input, MatrixBlock out, int outputCol, int startRow, int blk)` |

  - ### Uses of CacheBlock in org.apache.sysds.runtime.util

    Methods in org.apache.sysds.runtime.util that return CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static CacheBlock` | LocalFileUtils.`readCacheBlockFromLocal​(String fname, boolean matrix)` | Reads a matrix/frame block from local file system.

    Methods in org.apache.sysds.runtime.util with parameters of type CacheBlock
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | LocalFileUtils.`writeCacheBlockToLocal​(String fname, CacheBlock cb)` | Writes a matrix/frame block to local file system.