Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: unit_test/cpu_test.cc

Issue 2414763002: Cast for clang-cl 64 bit build warnings in unittests (Closed)
Patch Set: bump version Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « unit_test/convert_test.cc ('k') | unit_test/video_common_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2012 The LibYuv Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // NexGenDriven NexGen processor 89 // NexGenDriven NexGen processor
90 // RiseRiseRise Rise Technology processor 90 // RiseRiseRise Rise Technology processor
91 // SiS SiS SiS SiS processor 91 // SiS SiS SiS SiS processor
92 // UMC UMC UMC UMC processor 92 // UMC UMC UMC UMC processor
93 CpuId(0, 0, cpu_info); 93 CpuId(0, 0, cpu_info);
94 cpu_info[0] = cpu_info[1]; // Reorder output 94 cpu_info[0] = cpu_info[1]; // Reorder output
95 cpu_info[1] = cpu_info[3]; 95 cpu_info[1] = cpu_info[3];
96 cpu_info[3] = 0; 96 cpu_info[3] = 0;
97 printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast<char*>(&cpu_info[0]), 97 printf("Cpu Vendor: %s %x %x %x\n", reinterpret_cast<char*>(&cpu_info[0]),
98 cpu_info[0], cpu_info[1], cpu_info[2]); 98 cpu_info[0], cpu_info[1], cpu_info[2]);
99 EXPECT_EQ(12, strlen(reinterpret_cast<char*>(&cpu_info[0]))); 99 EXPECT_EQ(12u, strlen(reinterpret_cast<char*>(&cpu_info[0])));
100 100
101 // CPU Family and Model 101 // CPU Family and Model
102 // 3:0 - Stepping 102 // 3:0 - Stepping
103 // 7:4 - Model 103 // 7:4 - Model
104 // 11:8 - Family 104 // 11:8 - Family
105 // 13:12 - Processor Type 105 // 13:12 - Processor Type
106 // 19:16 - Extended Model 106 // 19:16 - Extended Model
107 // 27:20 - Extended Family 107 // 27:20 - Extended Family
108 CpuId(1, 0, cpu_info); 108 CpuId(1, 0, cpu_info);
109 int family = ((cpu_info[0] >> 8) & 0x0f) | ((cpu_info[0] >> 16) & 0xff0); 109 int family = ((cpu_info[0] >> 8) & 0x0f) | ((cpu_info[0] >> 16) & 0xff0);
(...skipping 20 matching lines...) Expand all
130 EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/juno.txt")); 130 EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/juno.txt"));
131 } else { 131 } else {
132 printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n"); 132 printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n");
133 } 133 }
134 #if defined(__linux__) && defined(__ARM_NEON__) 134 #if defined(__linux__) && defined(__ARM_NEON__)
135 EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("/proc/cpuinfo")); 135 EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("/proc/cpuinfo"));
136 #endif 136 #endif
137 } 137 }
138 138
139 } // namespace libyuv 139 } // namespace libyuv
OLDNEW
« no previous file with comments | « unit_test/convert_test.cc ('k') | unit_test/video_common_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698