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

Side by Side Diff: src/opts/SkNx_neon.h

Issue 1154523004: Everyone gets a namespace {}. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | « src/opts/Sk4px_none.h ('k') | src/opts/SkNx_sse.h » ('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 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkNx_neon_DEFINED 8 #ifndef SkNx_neon_DEFINED
9 #define SkNx_neon_DEFINED 9 #define SkNx_neon_DEFINED
10 10
11 #include <arm_neon.h> 11 namespace { // See SkNx.h
12 12
13 // Well, this is absurd. The shifts require compile-time constant arguments. 13 // Well, this is absurd. The shifts require compile-time constant arguments.
14 14
15 #define SHIFT8(op, v, bits) switch(bits) { \ 15 #define SHIFT8(op, v, bits) switch(bits) { \
16 case 1: return op(v, 1); case 2: return op(v, 2); case 3: return op(v , 3); \ 16 case 1: return op(v, 1); case 2: return op(v, 2); case 3: return op(v , 3); \
17 case 4: return op(v, 4); case 5: return op(v, 5); case 6: return op(v , 6); \ 17 case 4: return op(v, 4); case 5: return op(v, 5); case 6: return op(v , 6); \
18 case 7: return op(v, 7); \ 18 case 7: return op(v, 7); \
19 } return fVec 19 } return fVec
20 20
21 #define SHIFT16(op, v, bits) if (bits < 8) { SHIFT8(op, v, bits); } switch(bits) { \ 21 #define SHIFT16(op, v, bits) if (bits < 8) { SHIFT8(op, v, bits); } switch(bits) { \
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 return vgetq_lane_u8(fVec, k&16); 373 return vgetq_lane_u8(fVec, k&16);
374 } 374 }
375 375
376 uint8x16_t fVec; 376 uint8x16_t fVec;
377 }; 377 };
378 378
379 #undef SHIFT32 379 #undef SHIFT32
380 #undef SHIFT16 380 #undef SHIFT16
381 #undef SHIFT8 381 #undef SHIFT8
382 382
383 } // namespace
384
383 #endif//SkNx_neon_DEFINED 385 #endif//SkNx_neon_DEFINED
OLDNEW
« no previous file with comments | « src/opts/Sk4px_none.h ('k') | src/opts/SkNx_sse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698