Skip to content

Commit

Permalink
fix gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiyuetribe committed Jan 18, 2025
1 parent 5c3fe64 commit 56d46d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_gather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static ncnn::Mat IntMat(int dims, int axis)
1,
};
ncnn::Mat in1(6);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(3, 2); // 3D
return in1;
Expand All @@ -91,7 +91,7 @@ static ncnn::Mat IntMat(int dims, int axis)
6,
};
ncnn::Mat in1(12);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(6, 2); // 3D
return in1;
Expand All @@ -112,7 +112,7 @@ static ncnn::Mat IntMat(int dims, int axis)
1,
};
ncnn::Mat in1(6);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(1, 3, 2); // 3D
return in1;
Expand All @@ -130,7 +130,7 @@ static ncnn::Mat IntMat(int dims, int axis)
0,
};
ncnn::Mat in1(6);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(1, 3, 2); // 3D
return in1;
Expand All @@ -150,7 +150,7 @@ static ncnn::Mat IntMat(int dims, int axis)
3,
};
ncnn::Mat in1(8);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(4, 1, 2); // 3D
return in1;
Expand Down Expand Up @@ -211,7 +211,7 @@ static ncnn::Mat IntMat(int dims, int axis)
0,
};
ncnn::Mat in1(40);
auto ptr1 = (int*)in1.data;
int* ptr1 = (int*)in1.data;
memcpy(ptr1, int_data, sizeof(int_data));
in1 = in1.reshape(5, 4, 1, 2); // 3D
return in1;
Expand Down

0 comments on commit 56d46d2

Please sign in to comment.