estimateMemoryOverhead

open override fun estimateMemoryOverhead(view: TensorView<T, V>): Long(source)

Estimates the memory overhead of materializing the given view.

This method provides insight into the memory cost of materialization, helping with resource planning and strategy selection. The estimate includes both the data storage and any additional metadata overhead.

The returned value represents:

  • Positive numbers: additional memory required (in bytes)

  • Zero: no additional memory required (e.g., reference-only strategies)

  • Negative numbers: potential memory savings (e.g., when parent can be GC'd)

Return

estimated memory overhead in bytes

Parameters

view

the TensorView to analyze