Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 115fc29

Browse filesBrowse files
author
victorromeo
committed
Fixed pointer notation change
1 parent 5bec0b7 commit 115fc29
Copy full SHA for 115fc29

File tree

1 file changed

+4
-4
lines changed
Filter options

1 file changed

+4
-4
lines changed

‎src/uTensor/ops/Transpose.hpp

Copy file name to clipboardExpand all lines: src/uTensor/ops/Transpose.hpp
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class TransposeOperator : public OperatorInterface<1, 1> {
5353
output_shape[_axes[i]] = input_shape[i];
5454

5555
// output_strides(i) is derived from axes and input_strides
56-
output_strides[_axes[i]] = (*input_strides)[i];
56+
output_strides[_axes[i]] = input_strides[i];
5757
}
5858

5959
// Output shape can be asserted once the transform
6060
// effect has been determined
61-
output_shape->update_dims();
61+
output_shape.update_dims();
6262
output_tensor->resize(output_shape);
6363

6464
// Perform some basic checks
@@ -82,7 +82,7 @@ class TransposeOperator : public OperatorInterface<1, 1> {
8282
// Index of the source value, must be calculated
8383
// using the output strides and output shape
8484
uint32_t idx = 0;
85-
for (uint32_t j = 0; j < output_shape->num_dims(); j++) {
85+
for (uint32_t j = 0; j < output_shape.num_dims(); j++) {
8686
idx += offsets[j] * output_strides[j];
8787
}
8888

@@ -91,7 +91,7 @@ class TransposeOperator : public OperatorInterface<1, 1> {
9191

9292
// Update offsets, to iterate sequentially along strides
9393
// in the order of axes
94-
for (int32_t j = output_shape->num_dims() - 1; j >= 0; j--) {
94+
for (int32_t j = output_shape.num_dims() - 1; j >= 0; j--) {
9595
offsets[j] = (offsets[j] + 1) % (output_shape[j]);
9696
if( offsets[j] > 0 ) {
9797
break;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.