<commit_before>#ifndef _chpl_comm_compiler_macros_h_
#define _chpl_comm_compiler_macros_h_

#ifndef LAUNCHER

#include "chpl-mem.h"

//
// Multi-locale macros used for compiler code generation
//
// Note: Macros starting with CHPL_COMM involve some kind of communication
//


static ___always_inline
void chpl_gen_comm_get(void *addr, int32_t locale, void* raddr,
                       int32_t elemSize, int32_t typeIndex, int32_t len,
                       int ln, chpl_string fn)
{
  if (chpl_localeID == locale) {
    memmove(addr, raddr, elemSize*len);
  } else {
#ifdef CHPL_TASK_COMM_GET
    chpl_task_comm_get(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#else
    chpl_comm_get(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#endif
  }
}

static ___always_inline
void chpl_gen_comm_put(void* addr, int32_t locale, void* raddr,
                       int32_t elemSize, int32_t typeIndex, int32_t len,
                       int ln, chpl_string fn)
{
  if (chpl_localeID == locale) {
    memmove(raddr, addr, elemSize*len);
  } else {
#ifdef CHPL_TASK_COMM_PUT
    chpl_task_comm_put(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#else
    chpl_comm_put(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#endif
  }
}

static ___always_inline
void chpl_gen_comm_get_strd(void *addr, void *dststr, int32_t locale, void *raddr,
                       void *srcstr, void *count, int32_t strlevels, 
                       int32_t elemSize, int32_t typeIndex,
                       int ln, chpl_string fn)<commit_msg>Revert calls to memmove() back to memcpy()<commit_after>#ifndef _chpl_comm_compiler_macros_h_
#define _chpl_comm_compiler_macros_h_

#ifndef LAUNCHER

#include "chpl-mem.h"

//
// Multi-locale macros used for compiler code generation
//
// Note: Macros starting with CHPL_COMM involve some kind of communication
//


static ___always_inline
void chpl_gen_comm_get(void *addr, int32_t locale, void* raddr,
                       int32_t elemSize, int32_t typeIndex, int32_t len,
                       int ln, chpl_string fn)
{
  if (chpl_localeID == locale) {
    memcpy(addr, raddr, elemSize*len);
  } else {
#ifdef CHPL_TASK_COMM_GET
    chpl_task_comm_get(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#else
    chpl_comm_get(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#endif
  }
}

static ___always_inline
void chpl_gen_comm_put(void* addr, int32_t locale, void* raddr,
                       int32_t elemSize, int32_t typeIndex, int32_t len,
                       int ln, chpl_string fn)
{
  if (chpl_localeID == locale) {
    memcpy(raddr, addr, elemSize*len);
  } else {
#ifdef CHPL_TASK_COMM_PUT
    chpl_task_comm_put(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#else
    chpl_comm_put(addr, locale, raddr, elemSize, typeIndex, len, ln, fn);
#endif
  }
}

static ___always_inline
void chpl_gen_comm_get_strd(void *addr, void *dststr, int32_t locale, void *raddr,
                       void *srcstr, void *count, int32_t strlevels, 
                       int32_t elemSize, int32_t typeIndex,
                       int ln, chpl_string fn)
{'fraction_non_alphanumeric': 0.09041706462909901, 'fraction_numerical': 0.015281757402101241, 'mean_word_length': 3.1179554390563564, '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': '3302896', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1097, 'n_words': 289}