Skip to content

Commit

Permalink
expose number of components
Browse files Browse the repository at this point in the history
  • Loading branch information
fs-eire committed Sep 13, 2024
1 parent eae4c3f commit b8c369d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions onnxruntime/core/providers/webgpu/shader_variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class ShaderVariable {
// get the name of the variable.
inline std::string_view Name() const { return name_; }

// get the number of components of the variable.
inline int NumComponents() const { return num_components_; }

// create a WGSL expression ({varname}_indices_t) for getting indices from offset.
// \param offset: a WGSL expression (u32) representing the offset.
inline std::string OffsetToIndices(std::string_view offset_expr) const;
Expand Down

0 comments on commit b8c369d

Please sign in to comment.