📄 BarrierNode.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 4 |
🧱 Classes | 1 |
📦 Imports | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/nodes/gpgpu/BarrierNode.js
📦 Imports¶
Name | Source |
---|---|
Node |
../core/Node.js |
nodeProxy |
../tsl/TSLCore.js |
Functions¶
BarrierNode.generate(builder: any): void
¶
Parameters:
builder
any
Returns: void
Calls:
builder.addFlowCode
builder.addLineFlowCode
Code
workgroupBarrier(): BarrierNode
¶
Returns: BarrierNode
Calls:
barrier( 'workgroup' ).toStack
storageBarrier(): BarrierNode
¶
Returns: BarrierNode
Calls:
barrier( 'storage' ).toStack
textureBarrier(): BarrierNode
¶
Returns: BarrierNode
Calls:
barrier( 'texture' ).toStack
Classes¶
BarrierNode
¶
Class Code
class BarrierNode extends Node {
/**
* Constructs a new barrier node.
*
* @param {string} scope - The scope defines the behavior of the node.
*/
constructor( scope ) {
super();
this.scope = scope;
}
generate( builder ) {
const { scope } = this;
const { renderer } = builder;
if ( renderer.backend.isWebGLBackend === true ) {
builder.addFlowCode( `\t// ${scope}Barrier \n` );
} else {
builder.addLineFlowCode( `${scope}Barrier()`, this );
}
}
}