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