diff options
Diffstat (limited to '')
-rw-r--r-- | dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/binary.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/binary.ts b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/binary.ts new file mode 100644 index 0000000000..dcfc2b2a3f --- /dev/null +++ b/dom/webgpu/tests/cts/checkout/src/webgpu/shader/execution/expression/binary/binary.ts @@ -0,0 +1,9 @@ +import { ExpressionBuilder } from '../expression.js'; + +/* @returns an ExpressionBuilder that evaluates a binary operation */ +export function binary(op: string): ExpressionBuilder { + return values => { + const values_str = values.map(v => `(${v})`); + return `(${values_str.join(op)})`; + }; +} |