Skip to content

Commit

Permalink
Merge pull request #6390 from open-cv/fix-6389
Browse files Browse the repository at this point in the history
drop unnecessary cast

fix issue #6389
  • Loading branch information
shelhamer authored Jun 6, 2018
2 parents 05a1436 + 6d912a3 commit a357693
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/caffe/test/test_syncedmem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST_F(SyncedMemoryTest, TestGPURead) {
char* recovered_value = new char[10];
caffe_gpu_memcpy(10, gpu_data, recovered_value);
for (int i = 0; i < mem.size(); ++i) {
EXPECT_EQ((static_cast<char*>(recovered_value))[i], 1);
EXPECT_EQ(recovered_value[i], 1);
}
// do another round
cpu_data = mem.mutable_cpu_data();
Expand All @@ -94,7 +94,7 @@ TEST_F(SyncedMemoryTest, TestGPURead) {
// check if values are the same
caffe_gpu_memcpy(10, gpu_data, recovered_value);
for (int i = 0; i < mem.size(); ++i) {
EXPECT_EQ((static_cast<char*>(recovered_value))[i], 2);
EXPECT_EQ(recovered_value[i], 2);
}
delete[] recovered_value;
}
Expand Down

0 comments on commit a357693

Please sign in to comment.