Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyronn-torch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Seitz
pyronn-torch
Commits
fc396cfd
Commit
fc396cfd
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Add Cone_Projection_Kernel_Tex_Interp_Launcher
parent
c12a974f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
codegen/generate_wrappers.py
+25
-3
25 additions, 3 deletions
codegen/generate_wrappers.py
with
25 additions
and
3 deletions
codegen/generate_wrappers.py
+
25
−
3
View file @
fc396cfd
...
...
@@ -54,7 +54,6 @@ void Cone_Backprojection3D_Kernel_Launcher(const float *sinogram_ptr, float *out
const float volume_origin_x, const float volume_origin_y, const float volume_origin_z,
const int detector_width, const int detector_height, const float projection_multiplier);
"""
),
# noqa
'
Cone_Projection_Kernel_Launcher
'
:
CustomFunctionCall
(
'
Cone_Projection_Kernel_Launcher
'
,
FieldPointerSymbol
(
volume
.
name
,
volume
.
dtype
,
const
=
True
),
FieldPointerSymbol
(
projection
.
name
,
projection
.
dtype
,
const
=
False
),
...
...
@@ -74,7 +73,30 @@ void Cone_Projection_Kernel_Launcher(const float* volume_ptr, float *out, const
const int number_of_projections, const int volume_width, const int volume_height, const int volume_depth,
const float volume_spacing_x, const float volume_spacing_y, const float volume_spacing_z,
const int detector_width, const int detector_height, const float step_size);
"""
)
# noqa
"""
),
# noqa
'
Cone_Projection_Kernel_Tex_Interp_Launcher
'
:
CustomFunctionCall
(
'
Cone_Projection_Kernel_Tex_Interp_Launcher
'
,
FieldPointerSymbol
(
volume
.
name
,
volume
.
dtype
,
const
=
True
),
FieldPointerSymbol
(
projection
.
name
,
projection
.
dtype
,
const
=
False
),
FieldPointerSymbol
(
inv_matrices
.
name
,
inv_matrices
.
dtype
,
const
=
True
),
FieldPointerSymbol
(
source_points
.
name
,
source_points
.
dtype
,
const
=
True
),
FieldShapeSymbol
([
source_points
.
name
],
0
),
*
[
FieldShapeSymbol
([
'
volume
'
],
i
)
for
i
in
range
(
2
,
-
1
,
-
1
)],
TypedSymbol
(
'
volume_spacing_x
'
,
create_type
(
'
float32
'
),
const
=
True
),
TypedSymbol
(
'
volume_spacing_y
'
,
create_type
(
'
float32
'
),
const
=
True
),
TypedSymbol
(
'
volume_spacing_z
'
,
create_type
(
'
float32
'
),
const
=
True
),
*
[
FieldShapeSymbol
([
'
projection
'
],
i
)
for
i
in
range
(
1
,
-
1
,
-
1
)],
TypedSymbol
(
'
step_size
'
,
create_type
(
'
float32
'
),
const
=
True
),
fields_accessed
=
[
volume
,
projection
,
inv_matrices
,
source_points
],
custom_signature
=
"""
void Cone_Projection_Kernel_Tex_Interp_Launcher(
const float *__restrict__ volume_ptr, float *out,
const float *inv_AR_matrix, const float *src_points,
const int number_of_projections, const int volume_width,
const int volume_height, const int volume_depth,
const float volume_spacing_x, const float volume_spacing_y,
const float volume_spacing_z, const int detector_width,
const int detector_height, const float step_size);
"""
),
# noqa
}
...
...
@@ -94,8 +116,8 @@ def main():
rmtree
(
join
(
object_cache
,
module_name
,
'
helper_headers
'
))
copytree
(
join
(
dirname
(
__file__
),
'
..
'
,
'
src
'
,
'
pyronn_torch
'
,
'
PYRO-NN-Layers
'
,
'
helper_headers
'
),
join
(
object_cache
,
module_name
,
'
helper_headers
'
))
for
s
in
args
.
source_files
:
for
s
in
args
.
source_files
:
dst
=
join
(
object_cache
,
module_name
,
basename
(
s
).
replace
(
'
.cu.cc
'
,
'
.cu
'
))
copyfile
(
s
,
dst
)
# Torch only accepts *.cu as CUDA
cuda_sources
.
append
(
dst
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment