<commit_before>/***************************************************************************
 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
 * Copyright 2006-2010, The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 ***************************************************************************/

/* Changes:
 * 2011-04-01 ARM
 *    Merged the functions from src/opts/opts_check_arm_neon.cpp
 *    Modified to return ARM version of memset16 and memset32 if no neon
 *    available in the core
 */

#include "SkUtils.h"

extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count);

extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count);
extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count);

static inline bool hasNeonRegisters() {
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
    return true;
#else
    return false;
#endif
}

SkMemset16Proc SkMemset16GetPlatformProc() {
    if (hasNeonRegisters()) {
        return memset16_neon;
    } else {
#if defined(SK_CPU_LENDIAN)
        return arm_memset16;
#else
        return NULL;
#endif
    }
}

SkMemset32Proc SkMemset32GetPlatformProc() {
    if (hasNeonRegisters()) {
        return memset32_neon;
    } else {
#if defined(SK_CPU_LENDIAN)
        return arm_memset32;
#else
        return NULL;
#endif
    }
}<commit_msg>don't mention the neon functions if no neon is available<commit_after>/***************************************************************************
 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
 * Copyright 2006-2010, The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 ***************************************************************************/

/* Changes:
 * 2011-04-01 ARM
 *    Merged the functions from src/opts/opts_check_arm_neon.cpp
 *    Modified to return ARM version of memset16 and memset32 if no neon
 *    available in the core
 */

#include "SkUtils.h"

#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
extern "C" void memset16_neon(uint16_t dst[], uint16_t value, int count);
extern "C" void memset32_neon(uint32_t dst[], uint32_t value, int count);
#endif

#if defined(SK_CPU_LENDIAN)
extern "C" void arm_memset16(uint16_t* dst, uint16_t value, int count);
extern "C" void arm_memset32(uint32_t* dst, uint32_t value, int count);
#endif

SkMemset16Proc SkMemset16GetPlatformProc() {
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
    return memset16_neon;
#elif defined(SK_CPU_LENDIAN)
    return arm_memset16;
#else
    return NULL;
#endif
}

SkMemset32Proc SkMemset32GetPlatformProc() {
#if defined(__ARM_HAVE_NEON) && defined(SK_CPU_LENDIAN)
    return memset32_neon;
#elif defined(SK_CPU_LENDIAN)
    return arm_memset32;
#else
    return NULL;
#endif
}
{'fraction_non_alphanumeric': 0.18254497001998668, 'fraction_numerical': 0.04263824117255163, 'mean_word_length': 4.808510638297872, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '787265', 'n_tokens_mistral': 1057, 'n_tokens_neox': 954, 'n_words': 285}