Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::gpu::WorkgroupSize Struct Reference

Workgroup size a compute entry point declares. More...

#include "donner/gpu/Descriptors.h"

Public Member Functions

bool operator== (const WorkgroupSize &other) const =default
 Equality operator.

Public Attributes

uint32_t x = 1
 Invocations along X. Must be nonzero.
uint32_t y = 1
 Invocations along Y. Must be nonzero.
uint32_t z = 1
 Invocations along Z. Must be nonzero.

Friends

std::ostream & operator<< (std::ostream &os, const WorkgroupSize &value)
 Ostream output operator, e.g. 8x8x1.

Detailed Description

Workgroup size a compute entry point declares.

The runtime carries it in the pipeline descriptor rather than reading it back from the shader because Metal takes the threadgroup size at dispatch time, not from the compiled pipeline state; every backend then dispatches with the same declared shape. Device::createComputePipeline checks the value against the size the shader module reports for the same entry point, so the two cannot disagree.

Member Function Documentation

◆ operator==()

bool donner::gpu::WorkgroupSize::operator== ( const WorkgroupSize & other) const
default

Equality operator.

Parameters
otherSize to compare against.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const WorkgroupSize & value )
friend

Ostream output operator, e.g. 8x8x1.

Parameters
osOutput stream.
valueSize to output.

The documentation for this struct was generated from the following file: