# 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.compress.lib
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.frame.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`

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

Methods in org.apache.sysds.runtime.compress.lib with parameters of type CacheBlock
Modifier and Type
Method
Description
`static org.apache.commons.lang3.tuple.Pair<MatrixBlock,FrameBlock>`
CLALibBinCompress.`binCompress(CacheBlock<?> X, MatrixBlock d, int k)`

## 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()`
`CacheBlock<T>`
CacheBlock.`merge(T that, boolean appendOnly)`
Merge disjoint: merges all non-zero values of the given input into the current block.
`static CacheBlock<?>`
CacheBlockFactory.`newInstance(int code)`
`static CacheBlock<?>`
CacheBlockFactory.`newInstance(CacheBlock<?> block)`
`static CacheBlock<?>`
LazyWriteBuffer.`readBlock(String fname, boolean matrix)`
`static CacheBlock<?>`
UnifiedMemoryManager.`readBlock(String fname, boolean matrix)`
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru, boolean deep)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru, int cl, int cu)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru, int cl, int cu, boolean deep)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru, int cl, int cu, boolean deep, T block)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(int rl, int ru, int cl, int cu, T block)`
Slice a sub block out of the current block and write into the given output block.
`CacheBlock<T>`
CacheBlock.`slice(IndexRange ixrange, T ret)`
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.
`static CacheBlock<?>`
CacheBlockFactory.`newInstance(CacheBlock<?> block)`
`void`
ByteBuffer.`serializeBlock(CacheBlock<?> cb)`
`void`
CacheMaintenanceService.`serializeData(ByteBuffer bbuff, CacheBlock<?> cb)`
`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
Modifier
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.

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

Classes in org.apache.sysds.runtime.frame.data that implement CacheBlock
Modifier and Type
Class
Description
`class`
`FrameBlock`

## 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`
`MatrixBlock`
Methods in org.apache.sysds.runtime.matrix.data with parameters of type CacheBlock
Modifier and Type
Method
Description
`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.

## 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, org.apache.sysds.runtime.transform.encode.MultiColumnEncoder.EncoderMeta encm, long nnz)`
`void`
ColumnEncoderUDF.`applyDense(CacheBlock<?> in, MatrixBlock out, int outputCol, int rowStart, int blk)`
`void`
ColumnEncoderWordEmbedding.`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`
ColumnEncoderBagOfWords.`build(CacheBlock<?> in)`
`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`
ColumnEncoderWordEmbedding.`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`
ColumnEncoder.`computeMapSizeEstimate(CacheBlock<?> in, int[] sampleIndices)`
`void`
ColumnEncoderBagOfWords.`computeMapSizeEstimate(CacheBlock<?> in, int[] sampleIndices)`
`void`
ColumnEncoderComposite.`computeMapSizeEstimate(CacheBlock<?> in, int[] sampleIndices)`
`void`
ColumnEncoderRecode.`computeMapSizeEstimate(CacheBlock<?> in, int[] sampleIndices)`
`double`
ColumnEncoderBagOfWords.`computeNnzEstimate(CacheBlock<?> in, int[] sampleIndices)`
`void`
ColumnEncoderBagOfWords.`computeNnzPerRow(CacheBlock<?> in, int start, int end)`
`MatrixBlock`
MultiColumnEncoder.`encode(CacheBlock<?> in)`
`MatrixBlock`
MultiColumnEncoder.`encode(CacheBlock<?> in, boolean compressedOut)`
`MatrixBlock`
MultiColumnEncoder.`encode(CacheBlock<?> in, int k)`
`MatrixBlock`
MultiColumnEncoder.`encode(CacheBlock<?> in, int k, boolean compressedOut)`
`List<DependencyTask<?>>`
ColumnEncoder.`getApplyTasks(CacheBlock<?> in, MatrixBlock out, int outputCol, int[] sparseRowPointerOffsets)`
`List<DependencyTask<?>>`
ColumnEncoderComposite.`getApplyTasks(CacheBlock<?> in, MatrixBlock out, int outputCol, int[] sparseRowPointerOffsets)`
`Callable<Object>`
ColumnEncoder.`getBuildTask(CacheBlock<?> in)`
`Callable<Object>`
ColumnEncoderBagOfWords.`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, int p)`
`Callable<Object>`
ColumnEncoderBagOfWords.`getPartialBuildTask(CacheBlock<?> in, int startRow, int blockSize, HashMap<Integer,Object> ret, int pos)`
`Callable<Object>`
ColumnEncoderBin.`getPartialBuildTask(CacheBlock<?> in, int startRow, int blockSize, HashMap<Integer,Object> ret, int p)`
`Callable<Object>`
ColumnEncoderRecode.`getPartialBuildTask(CacheBlock<?> in, int startRow, int blockSize, HashMap<Integer,Object> ret, int p)`
`boolean`
MultiColumnEncoder.`isCompressedTransformEncode(CacheBlock<?> in, boolean enabled)`
Constructors in org.apache.sysds.runtime.transform.encode with parameters of type CacheBlock
Modifier
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.