MCPcopy Create free account
hub / github.com/RenderKit/oidn / planAllocs

Method planAllocs

core/graph.cpp:393–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391 }
392
393 void Graph::planAllocs()
394 {
395 tensorScratchPlanner.commit();
396
397 // Compute the size of the operation scratch
398 size_t opScratchByteSize = 0;
399 for (const auto& op : ops)
400 opScratchByteSize = max(opScratchByteSize, op->getScratchByteSize());
401 opScratchByteSize = round_up(opScratchByteSize, tensorScratchPlanner.getByteAlignment());
402
403 // Compute the size of the tensor scratch
404 tensorScratchByteOffset = opScratchByteSize;
405 size_t tensorScratchByteSize = round_up(tensorScratchPlanner.getByteSize(), memoryAlignment);
406
407 // Compute the total scratch size
408 scratchByteSize = opScratchByteSize + tensorScratchByteSize;
409
410 dirty = false;
411 }
412
413 bool Graph::isSupported() const
414 {

Callers

nothing calls this directly

Calls 5

maxFunction · 0.70
round_upFunction · 0.50
commitMethod · 0.45
getScratchByteSizeMethod · 0.45
getByteSizeMethod · 0.45

Tested by

no test coverage detected