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