MCPcopy Create free account
hub / github.com/KomputeProject/kompute / record

Method record

src/OpMemoryBarrier.cpp:29–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void
30OpMemoryBarrier::record(const vk::CommandBuffer& commandBuffer)
31{
32 KP_LOG_DEBUG("Kompute OpMemoryBarrier record called");
33
34 // Barrier to ensure the data is finished writing to buffer memory
35 if (this->mBarrierOnPrimary) {
36 for (const std::shared_ptr<Tensor>& tensor : this->mTensors) {
37 tensor->recordPrimaryBufferMemoryBarrier(commandBuffer,
38 this->mSrcAccessMask,
39 this->mDstAccessMask,
40 this->mSrcStageMask,
41 this->mDstStageMask);
42 }
43 } else {
44 for (const std::shared_ptr<Tensor>& tensor : this->mTensors) {
45 tensor->recordStagingBufferMemoryBarrier(commandBuffer,
46 this->mSrcAccessMask,
47 this->mDstAccessMask,
48 this->mSrcStageMask,
49 this->mDstStageMask);
50 }
51 }
52}
53
54void
55OpMemoryBarrier::preEval(const vk::CommandBuffer& /*commandBuffer*/)

Callers

nothing calls this directly

Tested by

no test coverage detected