Internal change
PiperOrigin-RevId: 496443946
This commit is contained in:
parent
7ce4bb72d4
commit
4822476974
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user