Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-spline-conv
Commits
ba0056d5
Commit
ba0056d5
authored
Mar 14, 2018
by
rusty1s
Browse files
removed branching
parent
0a42034e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
torch_spline_conv/src/cpu.c
torch_spline_conv/src/cpu.c
+13
-8
No files found.
torch_spline_conv/src/cpu.c
View file @
ba0056d5
...
@@ -47,14 +47,19 @@
...
@@ -47,14 +47,19 @@
GRAD_CODE \
GRAD_CODE \
g = value; \
g = value; \
\
\
for (d_it = 0; d_it < D; d_it++) { \
for (d_it = 0; d_it < d; d_it++) { \
if (d_it != d) { \
k_mod = (s / (int64_t) pow(M + 1, d_it)) % (M + 1); \
k_mod = (s / (int64_t) pow(M + 1, d_it)) % (M + 1); \
value = *(pseudo_data + d_it * pseudo_stride) * (kernel_size_data[d_it] - M * is_open_spline_data[d_it]); \
value = *(pseudo_data + d_it * pseudo_stride) * (kernel_size_data[d_it] - M * is_open_spline_data[d_it]); \
value -= floor(value); \
value -= floor(value); \
EVAL_CODE \
EVAL_CODE \
g *= value; \
g *= value; \
} \
} \
for (d_it = d + 1; d_it < D; d_it++) { \
k_mod = (s / (int64_t) pow(M + 1, d_it)) % (M + 1); \
value = *(pseudo_data + d_it * pseudo_stride) * (kernel_size_data[d_it] - M * is_open_spline_data[d_it]); \
value -= floor(value); \
EVAL_CODE \
g *= value; \
} \
} \
g_out += g * *(grad_basis_data + s * grad_basis_stride); \
g_out += g * *(grad_basis_data + s * grad_basis_stride); \
} \
} \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment