Internal change

PiperOrigin-RevId: 496443946
This commit is contained in:
Sebastian Schmidt 2022-12-19 11:05:23 -08:00 committed by Copybara-Service
parent 7ce4bb72d4
commit 4822476974

View File

@ -44,22 +44,14 @@ async function isSimdSupported(): Promise<boolean> {
}
async function createFileset(
taskName: string, basePath: string = '.'): Promise<WasmFileset> {
if (await isSimdSupported()) {
taskName: string, basePath: string = ''): Promise<WasmFileset> {
const suffix =
await isSimdSupported() ? 'wasm_internal' : 'wasm_nosimd_internal';
return {
wasmLoaderPath:
`${basePath}/${taskName}_wasm_internal.js`,
wasmBinaryPath:
`${basePath}/${taskName}_wasm_internal.wasm`,
wasmLoaderPath: `${basePath}/${taskName}_${suffix}.js`,
wasmBinaryPath: `${basePath}/${taskName}_${suffix}.wasm`,
};
} else {
return {
wasmLoaderPath:
`${basePath}/${taskName}_wasm_nosimd_internal.js`,
wasmBinaryPath:
`${basePath}/${taskName}_wasm_nosimd_internal.wasm`,
};
}
}
// tslint:disable:class-as-namespace