aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/opts/SkUtils_opts_arm.cpp
blob: d74471f787b213052b4c00dea6f4bf58b914945c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Copyright 2014 ARM Ltd.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkUtils.h"
#include "SkUtilsArm.h"

void sk_memset16_neon(uint16_t dst[], uint16_t value, int count);
void sk_memset32_neon(uint32_t dst[], uint32_t value, int count);

SkMemset16Proc SkMemset16GetPlatformProc() {
#if SK_ARM_NEON_IS_ALWAYS
    return sk_memset16_neon;
#elif SK_ARM_NEON_IS_DYNAMIC
    return sk_cpu_arm_has_neon() ? sk_memset16_neon : nullptr;
#else
    return nullptr;
#endif
}

SkMemset32Proc SkMemset32GetPlatformProc() {
#if SK_ARM_NEON_IS_ALWAYS
    return sk_memset32_neon;
#elif SK_ARM_NEON_IS_DYNAMIC
    return sk_cpu_arm_has_neon() ? sk_memset32_neon : nullptr;
#else
    return nullptr;
#endif
}

SkMemcpy32Proc SkMemcpy32GetPlatformProc() {
    return NULL;
}