Skip to content

Commit

Permalink
perf(PythonPackages): Add SIMD support
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed May 26, 2023
1 parent 3fb6d25 commit 43a937c
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b97",
"itkwasm >= 1.0.b105",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated file. Do not edit.

from pathlib import Path
from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down Expand Up @@ -44,7 +44,7 @@ def compress_stringify(
]

pipeline_inputs: List[PipelineInput] = [
PipelineInput(InterfaceTypes.BinaryStream, BinaryStream(input)),
PipelineInput(InterfaceTypes.BinaryStream, BinaryStream(PurePosixPath(input))),
]

args: List[str] = ['--memory-io',]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Generated file. Do not edit.

from pathlib import Path
from pathlib import Path, PurePosixPath
import os
from typing import Dict, Tuple, Optional
from typing import Dict, Tuple, Optional, List

from importlib_resources import files as file_resources

Expand Down Expand Up @@ -36,7 +36,7 @@ def parse_string_decompress(
]

pipeline_inputs: List[PipelineInput] = [
PipelineInput(InterfaceTypes.BinaryStream, BinaryStream(input)),
PipelineInput(InterfaceTypes.BinaryStream, BinaryStream(PurePosixPath(input))),
]

args: List[str] = ['--memory-io',]
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b97",
"itkwasm >= 1.0.b105",
"importlib_resources",

]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated file. Do not edit.

from typing import Optional
import os
from typing import Dict, Tuple, Optional

from itkwasm import (
environment_dispatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b97",
"itkwasm >= 1.0.b105",
"itkwasm-compress-stringify-wasi; sys_platform != \"emscripten\"",
"itkwasm-compress-stringify-emscripten; sys_platform == \"emscripten\"",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b103",
"itkwasm >= 1.0.b105",
]

[tool.hatch.version]
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/dicom/python/itkwasm-dicom-wasi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b104",
"itkwasm >= 1.0.b105",
"importlib_resources",

]
Expand Down
2 changes: 1 addition & 1 deletion packages/dicom/python/itkwasm-dicom/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b103",
"itkwasm >= 1.0.b105",
"itkwasm-dicom-wasi; sys_platform != \"emscripten\"",
"itkwasm-dicom-emscripten; sys_platform == \"emscripten\"",

Expand Down
2 changes: 1 addition & 1 deletion src/bindgen/python-resources/template.pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ keywords = [

requires-python = ">=3.7"
dependencies = [
"itkwasm >= 1.0.b104",@bindgenDependencies@
"itkwasm >= 1.0.b105",@bindgenDependencies@
]

[tool.hatch.version]
Expand Down
6 changes: 4 additions & 2 deletions src/bindgen/python.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,14 @@ from itkwasm import (
if (interfaceJsonTypeToInterfaceType.has(input.type)) {
const interfaceType = interfaceJsonTypeToInterfaceType.get(input.type)
switch (interfaceType) {
case "TextStream":
case "BinaryStream":
case "TextFile":
case "BinaryFile":
pipelineInputs += ` PipelineInput(InterfaceTypes.${interfaceType}, ${interfaceType}(PurePosixPath(${snakeCase(input.name)}))),\n`
break
case "TextStream":
case "BinaryStream":
pipelineInputs += ` PipelineInput(InterfaceTypes.${interfaceType}, ${interfaceType}(${snakeCase(input.name)})),\n`
break
default:
pipelineInputs += ` PipelineInput(InterfaceTypes.${interfaceType}, ${snakeCase(input.name)}),\n`
}
Expand Down
2 changes: 1 addition & 1 deletion src/itk-wasm-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import pythonBindgen from './bindgen/python.js'
const program = new Command()

// Array of types that will require an import from itk-wasm
const defaultImageTag = '20230504-85cdcf3f'
const defaultImageTag = '20230525-bfee36f8'

function processCommonOptions(wasiDefault=false) {
const options = program.opts()
Expand Down

0 comments on commit 43a937c

Please sign in to comment.