OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2009 The Android Open Source Project | 2 * Copyright 2009 The Android Open Source Project |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | |
10 #include <emmintrin.h> | 8 #include <emmintrin.h> |
11 #include "SkUtils_opts_SSE2.h" | 9 #include "SkUtils_opts_SSE2.h" |
12 | 10 |
13 void sk_memset16_SSE2(uint16_t *dst, uint16_t value, int count) | 11 void sk_memset16_SSE2(uint16_t *dst, uint16_t value, int count) |
14 { | 12 { |
15 SkASSERT(dst != NULL && count >= 0); | 13 SkASSERT(dst != NULL && count >= 0); |
16 | 14 |
17 // dst must be 2-byte aligned. | 15 // dst must be 2-byte aligned. |
18 SkASSERT((((size_t) dst) & 0x01) == 0); | 16 SkASSERT((((size_t) dst) & 0x01) == 0); |
19 | 17 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 d += 4; | 60 d += 4; |
63 count -= 16; | 61 count -= 16; |
64 } | 62 } |
65 dst = reinterpret_cast<uint32_t*>(d); | 63 dst = reinterpret_cast<uint32_t*>(d); |
66 } | 64 } |
67 while (count > 0) { | 65 while (count > 0) { |
68 *dst++ = value; | 66 *dst++ = value; |
69 --count; | 67 --count; |
70 } | 68 } |
71 } | 69 } |
OLD | NEW |