MCPcopy Index your code
hub / github.com/microsoft/TRELLIS / register_spatial_cache

Method register_spatial_cache

trellis/modules/sparse/basic.py:370–379  ·  view source on GitHub ↗

Register a spatial cache. The spatial cache can be any thing you want to cache. The registery and retrieval of the cache is based on current scale.

(self, key, value)

Source from the content-addressed store, hash-verified

368 return SparseTensor(feats=feats, coords=coords)
369
370 def register_spatial_cache(self, key, value) -> None:
371 """
372 Register a spatial cache.
373 The spatial cache can be any thing you want to cache.
374 The registery and retrieval of the cache is based on current scale.
375 """
376 scale_key = str(self._scale)
377 if scale_key not in self._spatial_cache:
378 self._spatial_cache[scale_key] = {}
379 self._spatial_cache[scale_key][key] = value
380
381 def get_spatial_cache(self, key=None):
382 """

Callers 5

forwardMethod · 0.95
forwardMethod · 0.95
collate_fnMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected