npuStackLibs function
Every library of vendor's stack on operatingSystem
(Platform.operatingSystem spelling), as CodeAsset names: what
NativeAssetsManifest.json lists when the build carries the stack, and what
Android hands LiteRT as the dispatch directory.
Implementation
List<String> npuStackLibs(NpuStack vendor, String operatingSystem) =>
switch (vendor) {
NpuStack.qualcomm => switch (operatingSystem) {
'android' => qualcommNpuLibs,
'linux' => qualcommNpuLibsLinux,
_ => throw ArgumentError.value(
operatingSystem,
'operatingSystem',
'NpuStack.qualcomm has no stack here',
),
},
NpuStack.googleTensor => switch (operatingSystem) {
'android' => googleTensorNpuLibs,
_ => throw ArgumentError.value(
operatingSystem,
'operatingSystem',
'NpuStack.googleTensor has no stack here',
),
},
NpuStack.mediatek => switch (operatingSystem) {
'android' => mediatekNpuLibs,
_ => throw ArgumentError.value(
operatingSystem,
'operatingSystem',
'NpuStack.mediatek has no stack here',
),
},
NpuStack.intel => switch (operatingSystem) {
'windows' => intelNpuLibs,
_ => throw ArgumentError.value(
operatingSystem,
'operatingSystem',
'NpuStack.intel has no stack here',
),
},
};