OLD | NEW |
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 |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 const Sk4h& a) { | 527 const Sk4h& a) { |
528 uint16x4x4_t rgba = {{ | 528 uint16x4x4_t rgba = {{ |
529 r.fVec, | 529 r.fVec, |
530 g.fVec, | 530 g.fVec, |
531 b.fVec, | 531 b.fVec, |
532 a.fVec, | 532 a.fVec, |
533 }}; | 533 }}; |
534 vst4_u16((uint16_t*) dst, rgba); | 534 vst4_u16((uint16_t*) dst, rgba); |
535 } | 535 } |
536 | 536 |
537 static inline void Sk4f_load4(const void* ptr, Sk4f* r, Sk4f* g, Sk4f* b, Sk4f*
a) { | |
538 float32x4x4_t rgba = vld4q_f32((const float*) ptr); | |
539 *r = rgba.val[0]; | |
540 *g = rgba.val[1]; | |
541 *b = rgba.val[2]; | |
542 *a = rgba.val[3]; | |
543 } | |
544 | |
545 static inline void Sk4f_store4(void* dst, const Sk4f& r, const Sk4f& g, const Sk
4f& b, | |
546 const Sk4f& a) { | |
547 float32x4x4_t rgba = {{ | |
548 r.fVec, | |
549 g.fVec, | |
550 b.fVec, | |
551 a.fVec, | |
552 }}; | |
553 vst4q_f32((float*) dst, rgba); | |
554 } | |
555 | |
556 #endif//SkNx_neon_DEFINED | 537 #endif//SkNx_neon_DEFINED |
OLD | NEW |