Search is not available for this dataset
repo_id stringlengths 12 110 | file_path stringlengths 24 164 | content stringlengths 3 89.3M | __index_level_0__ int64 0 0 |
|---|---|---|---|
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/common.hpp | #ifndef NUMPY_CORE_SRC_COMMON_COMMON_HPP
#define NUMPY_CORE_SRC_COMMON_COMMON_HPP
/*
* The following C++ headers are safe to be used standalone, however,
* they are gathered to make it easy for us and for the future need to support PCH.
*/
#include "npdef.hpp"
#include "utils.hpp"
#include "npstd.hpp"
#include "half... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_hashtable.c | /*
* This functionality is designed specifically for the ufunc machinery to
* dispatch based on multiple DTypes. Since this is designed to be used
* as purely a cache, it currently does no reference counting.
* Even though this is a cache, there is currently no maximum size. It may
* make sense to limit the size... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/python_xerbla.c | #define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/npy_common.h"
#include "npy_cblas.h"
/*
From the original manpage:
--------------------------
XERBLA is an error handler for the LAPACK routines.
It is called by an LAPACK routine if an input parameter has an invalid value.
A message is printed an... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_cpu_dispatch_distutils.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_CPU_DISPATCH_DISTUTILS_H_
#define NUMPY_CORE_SRC_COMMON_NPY_CPU_DISPATCH_DISTUTILS_H_
#ifndef NUMPY_CORE_SRC_COMMON_NPY_CPU_DISPATCH_H_
#error "Not standalone header please use 'npy_cpu_dispatch.h'"
#endif
/**
* This header should be removed after support for distutils is removed.... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/meta.hpp | #ifndef NUMPY_CORE_SRC_COMMON_META_HPP
#define NUMPY_CORE_SRC_COMMON_META_HPP
#include "npstd.hpp"
namespace np { namespace meta {
/// @addtogroup cpp_core_meta
/// @{
namespace details {
template<int size, bool unsig>
struct IntBySize;
template<bool unsig>
struct IntBySize<sizeof(uint8_t), unsig> {
using Type ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/numpyos.c | #define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/arrayobject.h"
#include "numpy/npy_math.h"
#include "npy_config.h"
#include "npy_pycompat.h"
#if defined(HAVE_STRTOLD_L) && !defined(_GNU_SOURCE)
# define _GNU_SOURCE
#endif
#include... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/get_attr_string.h | #ifndef NUMPY_CORE_SRC_COMMON_GET_ATTR_STRING_H_
#define NUMPY_CORE_SRC_COMMON_GET_ATTR_STRING_H_
#include <Python.h>
#include "ufunc_object.h"
static inline npy_bool
_is_basic_python_type(PyTypeObject *tp)
{
return (
/* Basic number types */
tp == &PyBool_Type ||
tp == &PyLong_Type ||
... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/cblasfuncs.c | /*
* This module provides a BLAS optimized matrix multiply,
* inner product and dot for numpy arrays
*/
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/arrayobject.h"
#include "numpy/npy_math.h"
#include "npy_cblas.h"
#include "ar... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_hashtable.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_NPY_HASHTABLE_H_
#define NUMPY_CORE_SRC_COMMON_NPY_NPY_HASHTABLE_H_
#include <Python.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "numpy/ndarraytypes.h"
typedef struct {
int key_len; /* number of identities used */
/* Buckets stores: val1, key1[0], key1[1], ..... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/ucsnarrow.c | #define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/arrayobject.h"
#include "numpy/npy_math.h"
#include "npy_config.h"
#include "npy_pycompat.h"
#include "ctors.h"
/*
* This file originally contained functions only needed on narrow b... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/array_assign.h | #ifndef NUMPY_CORE_SRC_COMMON_ARRAY_ASSIGN_H_
#define NUMPY_CORE_SRC_COMMON_ARRAY_ASSIGN_H_
/*
* An array assignment function for copying arrays, treating the
* arrays as flat according to their respective ordering rules.
* This function makes a temporary copy of 'src' if 'src' and
* 'dst' overlap, to be able to h... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/ucsnarrow.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_UCSNARROW_H_
#define NUMPY_CORE_SRC_COMMON_NPY_UCSNARROW_H_
NPY_NO_EXPORT PyUnicodeObject *
PyUnicode_FromUCS4(char const *src, Py_ssize_t size, int swap, int align);
#endif /* NUMPY_CORE_SRC_COMMON_NPY_UCSNARROW_H_ */
| 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_cblas.h | /*
* This header provides numpy a consistent interface to CBLAS code. It is needed
* because not all providers of cblas provide cblas.h. For instance, MKL provides
* mkl_cblas.h and also typedefs the CBLAS_XXX enums.
*/
#ifndef NUMPY_CORE_SRC_COMMON_NPY_CBLAS_H_
#define NUMPY_CORE_SRC_COMMON_NPY_CBLAS_H_
#include ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/mem_overlap.h | #ifndef NUMPY_CORE_SRC_COMMON_MEM_OVERLAP_H_
#define NUMPY_CORE_SRC_COMMON_MEM_OVERLAP_H_
#include "npy_config.h"
#include "numpy/ndarraytypes.h"
/* Bounds check only */
#define NPY_MAY_SHARE_BOUNDS 0
/* Exact solution */
#define NPY_MAY_SHARE_EXACT -1
typedef enum {
MEM_OVERLAP_NO = 0, /* no solution ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_argparse.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_ARGPARSE_H
#define NUMPY_CORE_SRC_COMMON_NPY_ARGPARSE_H
#include <Python.h>
#include "numpy/ndarraytypes.h"
/*
* This file defines macros to help with keyword argument parsing.
* This solves two issues as of now:
* 1. Pythons C-API PyArg_* keyword argument parsers are slow, due ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/numpyos.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_NUMPYOS_H_
#define NUMPY_CORE_SRC_COMMON_NPY_NUMPYOS_H_
#ifdef __cplusplus
extern "C" {
#endif
NPY_NO_EXPORT char*
NumPyOS_ascii_formatd(char *buffer, size_t buf_size,
const char *format,
double val, int decimal);
NPY_NO_EXPORT char*
NumPy... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_extint128.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_EXTINT128_H_
#define NUMPY_CORE_SRC_COMMON_NPY_EXTINT128_H_
typedef struct {
signed char sign;
npy_uint64 lo, hi;
} npy_extint128_t;
/* Integer addition with overflow checking */
static inline npy_int64
safe_add(npy_int64 a, npy_int64 b, char *overflow_flag)
{
if (a > 0... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_cblas_base.h | /*
* This header provides numpy a consistent interface to CBLAS code. It is needed
* because not all providers of cblas provide cblas.h. For instance, MKL provides
* mkl_cblas.h and also typedefs the CBLAS_XXX enums.
*/
/*
* ===========================================================================
* Prototypes... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_pycompat.h | #ifndef NUMPY_CORE_SRC_COMMON_NPY_PYCOMPAT_H_
#define NUMPY_CORE_SRC_COMMON_NPY_PYCOMPAT_H_
#include "numpy/npy_3kcompat.h"
/*
* In Python 3.10a7 (or b1), python started using the identity for the hash
* when a value is NaN. See https://bugs.python.org/issue43475
*/
#if PY_VERSION_HEX > 0x030a00a6
#define Npy_Ha... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/ufunc_override.c | #define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#include "npy_pycompat.h"
#include "get_attr_string.h"
#include "npy_import.h"
#include "ufunc_override.h"
#include "scalartypes.h"
/*
* Check whether an object has __array_ufunc__ defined on its class and it
* is not the default, i.e., the obj... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_sort.h.src | #ifndef __NPY_SORT_H__
#define __NPY_SORT_H__
/* Python include is for future object sorts */
#include <Python.h>
#include <numpy/npy_common.h>
#include <numpy/ndarraytypes.h>
#define NPY_ENOMEM 1
#define NPY_ECOMP 2
static inline int npy_get_msb(npy_uintp unum)
{
int depth_limit = 0;
while (unum >>= 1) {
... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/umathmodule.h | #ifndef NUMPY_CORE_SRC_COMMON_UMATHMODULE_H_
#define NUMPY_CORE_SRC_COMMON_UMATHMODULE_H_
#include "ufunc_object.h"
#include "ufunc_type_resolution.h"
#include "extobj.h" /* for the python side extobj set/get */
NPY_NO_EXPORT PyObject *
get_sfloat_dtype(PyObject *NPY_UNUSED(mod), PyObject *NPY_UNUSED(args));
/* De... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/float_status.hpp | #ifndef NUMPY_CORE_SRC_COMMON_FLOAT_STATUS_HPP
#define NUMPY_CORE_SRC_COMMON_FLOAT_STATUS_HPP
#include "npstd.hpp"
#include <fenv.h>
namespace np {
/// @addtogroup cpp_core_utility
/// @{
/**
* Class wraps floating-point environment operations,
* provides lazy access to its functionality.
*/
class FloatStatus {
... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/common/npy_longdouble.c | #define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/ndarraytypes.h"
#include "numpy/npy_math.h"
#include "npy_pycompat.h"
#include "numpyos.h"
/*
* Heavily derived from PyLong_FromDouble
* Notably, we can't set the digits directly, so... | 0 |
public_repos/numpy/numpy/_core/src/common | public_repos/numpy/numpy/_core/src/common/simd/simd_utils.h | #ifndef _NPY_SIMD_UTILS_H
#define _NPY_SIMD_UTILS_H
#define NPYV__SET_2(CAST, I0, I1, ...) (CAST)(I0), (CAST)(I1)
#define NPYV__SET_4(CAST, I0, I1, I2, I3, ...) \
(CAST)(I0), (CAST)(I1), (CAST)(I2), (CAST)(I3)
#define NPYV__SET_8(CAST, I0, I1, I2, I3, I4, I5, I6, I7, ...) \
(CAST)(I0), (CAST)(I1), (CAST)(I2)... | 0 |
public_repos/numpy/numpy/_core/src/common | public_repos/numpy/numpy/_core/src/common/simd/intdiv.h | /**
* This header implements `npyv_divisor_*` intrinsics used for computing the parameters
* of fast integer division, while division intrinsics `npyv_divc_*` are defined in
* {extension}/arithmetic.h.
*/
#ifndef NPY_SIMD
#error "Not a standalone header, use simd/simd.h instead"
#endif
#ifndef _NPY_SIMD_INTDIV_... | 0 |
public_repos/numpy/numpy/_core/src/common | public_repos/numpy/numpy/_core/src/common/simd/simd.h | #ifndef _NPY_SIMD_H_
#define _NPY_SIMD_H_
/**
* the NumPy C SIMD vectorization interface "NPYV" are types and functions intended
* to simplify vectorization of code on different platforms, currently supports
* the following SIMD extensions SSE, AVX2, AVX512, VSX and NEON.
*
* TODO: Add an independent sphinx doc.
*... | 0 |
public_repos/numpy/numpy/_core/src/common | public_repos/numpy/numpy/_core/src/common/simd/emulate_maskop.h | /**
* This header is used internally by all current supported SIMD extensions,
* except for AVX512.
*/
#ifndef NPY_SIMD
#error "Not a standalone header, use simd/simd.h instead"
#endif
#ifndef _NPY_SIMD_EMULATE_MASKOP_H
#define _NPY_SIMD_EMULATE_MASKOP_H
/**
* Implements conditional addition and subtraction.
... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/reorder.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_REORDER_H
#define _NPY_SIMD_AVX512_REORDER_H
// combine lower part of two vectors
#define npyv_combinel_u8(A, B) _mm512_inserti64x4(A, _mm512_castsi512_si256(B), 1)
#define npyv_combinel_s8 npyv_combinel_u8
#define npyv_combinel_u1... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/avx512.h | #ifndef _NPY_SIMD_H_
#error "Not a standalone header"
#endif
#define NPY_SIMD 512
#define NPY_SIMD_WIDTH 64
#define NPY_SIMD_F32 1
#define NPY_SIMD_F64 1
#define NPY_SIMD_FMA3 1 // native support
#define NPY_SIMD_BIGENDIAN 0
#define NPY_SIMD_CMPSIGNAL 0
// Enough limit to allow us to use _mm512_i32gather_* and _mm5... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/math.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_MATH_H
#define _NPY_SIMD_AVX512_MATH_H
/***************************
* Elementary
***************************/
// Square root
#define npyv_sqrt_f32 _mm512_sqrt_ps
#define npyv_sqrt_f64 _mm512_sqrt_pd
// Reciprocal
NPY_FINLINE npyv... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/misc.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_MISC_H
#define _NPY_SIMD_AVX512_MISC_H
// set all lanes to zero
#define npyv_zero_u8 _mm512_setzero_si512
#define npyv_zero_s8 _mm512_setzero_si512
#define npyv_zero_u16 _mm512_setzero_si512
#define npyv_zero_s16 _mm512_setzero_si... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/arithmetic.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_ARITHMETIC_H
#define _NPY_SIMD_AVX512_ARITHMETIC_H
#include "../avx2/utils.h"
#include "../sse/utils.h"
/***************************
* Addition
***************************/
// non-saturated
#ifdef NPY_HAVE_AVX512BW
#define npy... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/conversion.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_CVT_H
#define _NPY_SIMD_AVX512_CVT_H
// convert mask to integer vectors
#ifdef NPY_HAVE_AVX512BW
#define npyv_cvt_u8_b8 _mm512_movm_epi8
#define npyv_cvt_u16_b16 _mm512_movm_epi16
#else
#define npyv_cvt_u8_b8(BL) BL
... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/memory.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_MEMORY_H
#define _NPY_SIMD_AVX512_MEMORY_H
#include "misc.h"
/***************************
* load/store
***************************/
#if defined(__GNUC__)
// GCC expect pointer argument type to be `void*` instead of `const voi... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/utils.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_UTILS_H
#define _NPY_SIMD_AVX512_UTILS_H
#define npyv512_lower_si256 _mm512_castsi512_si256
#define npyv512_lower_ps256 _mm512_castps512_ps256
#define npyv512_lower_pd256 _mm512_castpd512_pd256
#define npyv512_higher_si256(A) _mm51... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/operators.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX512_OPERATORS_H
#define _NPY_SIMD_AVX512_OPERATORS_H
#include "conversion.h" // tobits
/***************************
* Shifting
***************************/
// left
#ifdef NPY_HAVE_AVX512BW
#define npyv_shl_u16(A, C) _mm512_sll_e... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx512/maskop.h | #ifndef NPY_SIMD
#error "Not a standalone header, use simd/simd.h instead"
#endif
#ifndef _NPY_SIMD_AVX512_MASKOP_H
#define _NPY_SIMD_AVX512_MASKOP_H
/**
* Implements conditional addition and subtraction.
* e.g. npyv_ifadd_f32(m, a, b, c) -> m ? a + b : c
* e.g. npyv_ifsub_f32(m, a, b, c) -> m ? a - b : c
*/
... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/avx2.h | #ifndef _NPY_SIMD_H_
#error "Not a standalone header"
#endif
#define NPY_SIMD 256
#define NPY_SIMD_WIDTH 32
#define NPY_SIMD_F32 1
#define NPY_SIMD_F64 1
#ifdef NPY_HAVE_FMA3
#define NPY_SIMD_FMA3 1 // native support
#else
#define NPY_SIMD_FMA3 0 // fast emulated
#endif
#define NPY_SIMD_BIGENDIAN 0
#define ... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/reorder.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_REORDER_H
#define _NPY_SIMD_AVX2_REORDER_H
// combine lower part of two vectors
#define npyv_combinel_u8(A, B) _mm256_permute2x128_si256(A, B, 0x20)
#define npyv_combinel_s8 npyv_combinel_u8
#define npyv_combinel_u16 npyv_combinel_u8... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/math.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_MATH_H
#define _NPY_SIMD_AVX2_MATH_H
/***************************
* Elementary
***************************/
// Square root
#define npyv_sqrt_f32 _mm256_sqrt_ps
#define npyv_sqrt_f64 _mm256_sqrt_pd
// Reciprocal
NPY_FINLINE npyv_f32 ... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/misc.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_MISC_H
#define _NPY_SIMD_AVX2_MISC_H
// vector with zero lanes
#define npyv_zero_u8 _mm256_setzero_si256
#define npyv_zero_s8 _mm256_setzero_si256
#define npyv_zero_u16 _mm256_setzero_si256
#define npyv_zero_s16 _mm256_setzero_si256... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/arithmetic.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_ARITHMETIC_H
#define _NPY_SIMD_AVX2_ARITHMETIC_H
#include "../sse/utils.h"
/***************************
* Addition
***************************/
// non-saturated
#define npyv_add_u8 _mm256_add_epi8
#define npyv_add_s8 _mm256_add_ep... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/conversion.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_CVT_H
#define _NPY_SIMD_AVX2_CVT_H
// convert mask types to integer types
#define npyv_cvt_u8_b8(A) A
#define npyv_cvt_s8_b8(A) A
#define npyv_cvt_u16_b16(A) A
#define npyv_cvt_s16_b16(A) A
#define npyv_cvt_u32_b32(A) A
#define np... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/memory.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#include "misc.h"
#ifndef _NPY_SIMD_AVX2_MEMORY_H
#define _NPY_SIMD_AVX2_MEMORY_H
/***************************
* load/store
***************************/
#define NPYV_IMPL_AVX2_MEM_INT(CTYPE, SFX) \
NPY_FINLINE npyv_#... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/utils.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_UTILS_H
#define _NPY_SIMD_AVX2_UTILS_H
#define npyv256_shuffle_odd(A) _mm256_permute4x64_epi64(A, _MM_SHUFFLE(3, 1, 2, 0))
#define npyv256_shuffle_odd_ps(A) _mm256_castsi256_ps(npyv256_shuffle_odd(_mm256_castps_si256(A)))
#define n... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/avx2/operators.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_AVX2_OPERATORS_H
#define _NPY_SIMD_AVX2_OPERATORS_H
/***************************
* Shifting
***************************/
// left
#define npyv_shl_u16(A, C) _mm256_sll_epi16(A, _mm_cvtsi32_si128(C))
#define npyv_shl_s16(A, C) _mm256_sll_... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/vec.h | /**
* branch /vec(altivec-like) provides the SIMD operations for
* both IBM VSX(Power) and VX(ZArch).
*/
#ifndef _NPY_SIMD_H_
#error "Not a standalone header"
#endif
#if !defined(NPY_HAVE_VX) && !defined(NPY_HAVE_VSX2)
#error "require minimum support VX(zarch11) or VSX2(Power8/ISA2.07)"
#endif
#if defined(N... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/reorder.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_REORDER_H
#define _NPY_SIMD_VEC_REORDER_H
// combine lower part of two vectors
#define npyv__combinel(A, B) vec_mergeh((npyv_u64)(A), (npyv_u64)(B))
#define npyv_combinel_u8(A, B) ((npyv_u8) npyv__combinel(A, B))
#define npyv_combinel... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/math.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_MATH_H
#define _NPY_SIMD_VEC_MATH_H
/***************************
* Elementary
***************************/
// Square root
#if NPY_SIMD_F32
#define npyv_sqrt_f32 vec_sqrt
#endif
#define npyv_sqrt_f64 vec_sqrt
// Reciprocal
#if NPY... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/misc.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_MISC_H
#define _NPY_SIMD_VEC_MISC_H
// vector with zero lanes
#define npyv_zero_u8() ((npyv_u8) npyv_setall_s32(0))
#define npyv_zero_s8() ((npyv_s8) npyv_setall_s32(0))
#define npyv_zero_u16() ((npyv_u16) npyv_setall_s32(0))
#d... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/arithmetic.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_ARITHMETIC_H
#define _NPY_SIMD_VEC_ARITHMETIC_H
/***************************
* Addition
***************************/
// non-saturated
#define npyv_add_u8 vec_add
#define npyv_add_s8 vec_add
#define npyv_add_u16 vec_add
#define npyv... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/conversion.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_CVT_H
#define _NPY_SIMD_VEC_CVT_H
// convert boolean vectors to integer vectors
#define npyv_cvt_u8_b8(BL) ((npyv_u8) BL)
#define npyv_cvt_s8_b8(BL) ((npyv_s8) BL)
#define npyv_cvt_u16_b16(BL) ((npyv_u16) BL)
#define npyv_cvt_s16... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/memory.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_MEMORY_H
#define _NPY_SIMD_VEC_MEMORY_H
#include "misc.h"
/****************************
* Private utilities
****************************/
// TODO: test load by cast
#define VSX__CAST_lOAD 0
#if VSX__CAST_lOAD
#define npyv__load(... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/utils.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_UTILS_H
#define _NPY_SIMD_VEC_UTILS_H
// the following intrinsics may not some|all by zvector API on gcc/clang
#ifdef NPY_HAVE_VX
#ifndef vec_neg
#define vec_neg(a) (-(a)) // Vector Negate
#endif
#ifndef vec_add
... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/vec/operators.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_VEC_OPERATORS_H
#define _NPY_SIMD_VEC_OPERATORS_H
/***************************
* Shifting
***************************/
// Left
#define npyv_shl_u16(A, C) vec_sl(A, npyv_setall_u16(C))
#define npyv_shl_s16(A, C) vec_sl_s16(A, npyv_setall... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/reorder.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_REORDER_H
#define _NPY_SIMD_NEON_REORDER_H
// combine lower part of two vectors
#ifdef __aarch64__
#define npyv_combinel_u8(A, B) vreinterpretq_u8_u64(vzip1q_u64(vreinterpretq_u64_u8(A), vreinterpretq_u64_u8(B)))
#define npyv... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/math.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_MATH_H
#define _NPY_SIMD_NEON_MATH_H
/***************************
* Elementary
***************************/
// Absolute
#define npyv_abs_f32 vabsq_f32
#define npyv_abs_f64 vabsq_f64
// Square
NPY_FINLINE npyv_f32 npyv_square_f32(np... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/misc.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_MISC_H
#define _NPY_SIMD_NEON_MISC_H
// vector with zero lanes
#define npyv_zero_u8() vreinterpretq_u8_s32(npyv_zero_s32())
#define npyv_zero_s8() vreinterpretq_s8_s32(npyv_zero_s32())
#define npyv_zero_u16() vreinterpretq_u16_s32(n... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/arithmetic.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_ARITHMETIC_H
#define _NPY_SIMD_NEON_ARITHMETIC_H
/***************************
* Addition
***************************/
// non-saturated
#define npyv_add_u8 vaddq_u8
#define npyv_add_s8 vaddq_s8
#define npyv_add_u16 vaddq_u16
#defin... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/conversion.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_CVT_H
#define _NPY_SIMD_NEON_CVT_H
// convert boolean vectors to integer vectors
#define npyv_cvt_u8_b8(A) A
#define npyv_cvt_s8_b8 vreinterpretq_s8_u8
#define npyv_cvt_u16_b16(A) A
#define npyv_cvt_s16_b16 vreinterpretq_s16_u16
#... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/memory.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_MEMORY_H
#define _NPY_SIMD_NEON_MEMORY_H
#include "misc.h"
/***************************
* load/store
***************************/
// GCC requires literal type definitions for pointers types otherwise it causes ambiguous errors
#def... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/operators.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_NEON_OPERATORS_H
#define _NPY_SIMD_NEON_OPERATORS_H
/***************************
* Shifting
***************************/
// left
#define npyv_shl_u16(A, C) vshlq_u16(A, npyv_setall_s16(C))
#define npyv_shl_s16(A, C) vshlq_s16(A, npyv_se... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/neon/neon.h | #ifndef _NPY_SIMD_H_
#error "Not a standalone header"
#endif
#define NPY_SIMD 128
#define NPY_SIMD_WIDTH 16
#define NPY_SIMD_F32 1
#ifdef __aarch64__
#define NPY_SIMD_F64 1
#else
#define NPY_SIMD_F64 0
#endif
#ifdef NPY_HAVE_NEON_VFPV4
#define NPY_SIMD_FMA3 1 // native support
#else
#define NPY_SI... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/reorder.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_REORDER_H
#define _NPY_SIMD_SSE_REORDER_H
// combine lower part of two vectors
#define npyv_combinel_u8 _mm_unpacklo_epi64
#define npyv_combinel_s8 _mm_unpacklo_epi64
#define npyv_combinel_u16 _mm_unpacklo_epi64
#define npyv_combinel... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/math.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_MATH_H
#define _NPY_SIMD_SSE_MATH_H
/***************************
* Elementary
***************************/
// Square root
#define npyv_sqrt_f32 _mm_sqrt_ps
#define npyv_sqrt_f64 _mm_sqrt_pd
// Reciprocal
NPY_FINLINE npyv_f32 npyv_rec... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/misc.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_MISC_H
#define _NPY_SIMD_SSE_MISC_H
// vector with zero lanes
#define npyv_zero_u8 _mm_setzero_si128
#define npyv_zero_s8 _mm_setzero_si128
#define npyv_zero_u16 _mm_setzero_si128
#define npyv_zero_s16 _mm_setzero_si128
#define npyv_... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/arithmetic.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_ARITHMETIC_H
#define _NPY_SIMD_SSE_ARITHMETIC_H
/***************************
* Addition
***************************/
// non-saturated
#define npyv_add_u8 _mm_add_epi8
#define npyv_add_s8 _mm_add_epi8
#define npyv_add_u16 _mm_add_ep... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/sse.h | #ifndef _NPY_SIMD_H_
#error "Not a standalone header"
#endif
#define NPY_SIMD 128
#define NPY_SIMD_WIDTH 16
#define NPY_SIMD_F32 1
#define NPY_SIMD_F64 1
#if defined(NPY_HAVE_FMA3) || defined(NPY_HAVE_FMA4)
#define NPY_SIMD_FMA3 1 // native support
#else
#define NPY_SIMD_FMA3 0 // fast emulated
#endif
#d... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/conversion.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_CVT_H
#define _NPY_SIMD_SSE_CVT_H
// convert mask types to integer types
#define npyv_cvt_u8_b8(BL) BL
#define npyv_cvt_s8_b8(BL) BL
#define npyv_cvt_u16_b16(BL) BL
#define npyv_cvt_s16_b16(BL) BL
#define npyv_cvt_u32_b32(BL) BL
#d... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/memory.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_MEMORY_H
#define _NPY_SIMD_SSE_MEMORY_H
#include "misc.h"
/***************************
* load/store
***************************/
// stream load
#ifdef NPY_HAVE_SSE41
#define npyv__loads(PTR) _mm_stream_load_si128((__m128i *)(PTR... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/utils.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_UTILS_H
#define _NPY_SIMD_SSE_UTILS_H
#if !defined(__x86_64__) && !defined(_M_X64)
NPY_FINLINE npy_int64 npyv128_cvtsi128_si64(__m128i a)
{
npy_int64 NPY_DECL_ALIGNED(16) idx[2];
_mm_store_si128((__m128i *)idx, a);
return i... | 0 |
public_repos/numpy/numpy/_core/src/common/simd | public_repos/numpy/numpy/_core/src/common/simd/sse/operators.h | #ifndef NPY_SIMD
#error "Not a standalone header"
#endif
#ifndef _NPY_SIMD_SSE_OPERATORS_H
#define _NPY_SIMD_SSE_OPERATORS_H
/***************************
* Shifting
***************************/
// left
#define npyv_shl_u16(A, C) _mm_sll_epi16(A, _mm_cvtsi32_si128(C))
#define npyv_shl_s16(A, C) _mm_sll_epi16(A,... | 0 |
public_repos/numpy/numpy/_core/src/common | public_repos/numpy/numpy/_core/src/common/dlpack/dlpack.h | // Taken from:
// https://github.com/dmlc/dlpack/blob/ca4d00ad3e2e0f410eeab3264d21b8a39397f362/include/dlpack/dlpack.h
/*!
* Copyright (c) 2017 by Contributors
* \file dlpack.h
* \brief The common header of DLPack.
*/
#ifndef DLPACK_DLPACK_H_
#define DLPACK_DLPACK_H_
/**
* \brief Compatibility with C++
*/
#ifde... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/reduction.h | #ifndef _NPY_PRIVATE__REDUCTION_H_
#define _NPY_PRIVATE__REDUCTION_H_
/************************************************************
* Typedefs used by PyArray_ReduceWrapper, new in 1.7.
************************************************************/
/*
* This is a function for assigning a reduction identity to the r... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/extobj.h | #ifndef _NPY_PRIVATE__EXTOBJ_H_
#define _NPY_PRIVATE__EXTOBJ_H_
#include <numpy/ndarraytypes.h> /* for NPY_NO_EXPORT */
/* For the private exposure of the extobject contextvar to Python */
extern NPY_NO_EXPORT PyObject *npy_extobj_contextvar;
/*
* Represent the current ufunc error (and buffer) state. we are usin... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/_umath_tests.dispatch.c | /**
* Testing the utilities of the CPU dispatcher
*
* @targets $werror baseline
* SSE2 SSE41 AVX2
* VSX VSX2 VSX3
* NEON ASIMD ASIMDHP
*/
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "npy_cpu_dispatch.h"
#include "numpy/utils.h" // NPY_TOSTRING
#ifndef NPY_DISABLE_OPTIMIZATION
#include "_umath_tes... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/wrapping_array_method.c | /*
* This file defines most of the machinery in order to wrap an existing ufunc
* loop for use with a different set of dtypes.
*
* There are two approaches for this, one is to teach the NumPy core about
* the possibility that the loop descriptors do not match exactly the result
* descriptors.
* The other is to h... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/matmul.h.src | /**begin repeat
* #TYPE = FLOAT, DOUBLE, LONGDOUBLE, HALF,
* CFLOAT, CDOUBLE, CLONGDOUBLE,
* UBYTE, USHORT, UINT, ULONG, ULONGLONG,
* BYTE, SHORT, INT, LONG, LONGLONG,
* BOOL, OBJECT#
**/
NPY_NO_EXPORT void
@TYPE@_matmul(char **args, npy_intp const *dimensions, npy_intp const ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/matmul.c.src | /* -*- c -*- */
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "npy_config.h"
#include "numpy/npy_common.h"
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "numpy/npy_math.h"
#include "numpy/half... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/special_integer_comparisons.cpp | #include <Python.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define _UMATHMODULE
#include "numpy/ndarraytypes.h"
#include "numpy/npy_math.h"
#include "numpy/ufuncobject.h"
#include "abstractdtypes.h"
#include "dispatching.h"
#include "dtypemeta.h"
#include "common_dtype.h"
#include "c... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/ufunc_object.c | /*
* Python Universal Functions Object -- Math for all types, plus fast
* arrays math
*
* Full description
*
* This supports mathematical (and Boolean) functions on arrays and other python
* objects. Math on large arrays of basic C types is rather efficient.
*
* Travis E. Oliphant 2005, 2006 oliphant@ee.byu.... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_trigonometric.dispatch.c.src | /*@targets
** $maxopt baseline
** (avx2 fma3) avx512f
** vsx2 vsx3 vsx4
** neon_vfpv4
** vxe vxe2
**/
#include "numpy/npy_math.h"
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "fast_loop_macros.h"
/*
* TODO:
* - use vectorized version of Payne-Hanek style reduction for large elemen... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/scalarmath.c.src | /* -*- c -*- */
/* The purpose of this module is to add faster math for array scalars
that does not go through the ufunc machinery
but still supports error-modes.
*/
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#inclu... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_unary_fp_le.dispatch.c.src | /*@targets
** $maxopt baseline
** sse2 sse41
** vsx2
** neon asimd
**/
/**
* Force use SSE only on x86, even if AVX2 or AVX512F are enabled
* through the baseline, since scatter(AVX512F) and gather very costly
* to handle non-contiguous memory access comparing with SSE for
* such small operations that this fi... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_modulo.dispatch.c.src | /*@targets
** baseline vsx4
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlevel_strided_loops.h"
// Provides the various *_LOOP macros
#include "fast_loop_macros.h"
#define DIVIDEBYZER... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_umath_fp.dispatch.c.src | /*@targets
** $maxopt baseline avx512_skx
*/
#include "numpy/npy_math.h"
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "npy_svml.h"
#include "fast_loop_macros.h"
#if NPY_SIMD && defined(NPY_HAVE_AVX512_SKX) && defined(NPY_CAN_LINK_SVML)
/**begin repeat
* #sfx = f32, f64#
* #func_suffi... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/_operand_flag_tests.c | #define PY_SSIZE_T_CLEAN
#include <Python.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include <numpy/arrayobject.h>
#include <numpy/ufuncobject.h>
#include "numpy/npy_3kcompat.h"
#include <math.h>
#include <structmember.h>
static PyMethodDef TestMethods[] = {
{NULL, NULL, 0, NULL}
};
static void
inpl... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/clip.cpp | /**
* This module provides the inner loops for the clip ufunc
*/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "numpy/halffloat.h"
#include "numpy/ndarraytypes.h"
#include "numpy/npy_common.h"
#include "numpy/npy_ma... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_minmax.dispatch.c.src | /*@targets
** $maxopt baseline
** neon asimd
** sse2 avx2 avx512_skx
** vsx2
** vx vxe
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlevel_strided_loops.h"
// Provides the various *_... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_autovec.dispatch.c.src | /*@targets
** $maxopt $autovec baseline
** sse2 avx2
** neon
** vsx2
** vx
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
// Provides the various *_LOOP macros
#include "fast_loop_macros.h"
/*
*... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_arithmetic.dispatch.c.src | /*@targets
** $maxopt baseline
** sse2 sse41 avx2 avx512f avx512_skx
** vsx2 vsx4
** neon
** vx
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlevel_strided_loops.h"
// Provides the v... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/_rational_tests.c | /* Fixed size rational numbers exposed to Python */
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <structmember.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "numpy/arrayobject.h"
#include "numpy/ufuncobject.h"
#include "numpy/npy_3kcompat.h"
#include "common.h" /* for error_converting */
#includ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_comparison.dispatch.c.src | /*@targets
** $maxopt baseline
** sse2 sse42 avx2 avx512f avx512_skx
** vsx2 vsx3
** neon
** vx vxe
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlevel_strided_loops.h"
// Provides t... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/string_ufuncs.cpp | #include <Python.h>
#include <string.h>
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define _UMATHMODULE
#include "numpy/ndarraytypes.h"
#include "numpy/npy_math.h"
#include "numpy/ufuncobject.h"
#include "numpyos.h"
#include "dispatching.h"
#include "dtypemeta.h"
#include "common_dtype.h... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/dispatching.c | /*
* This file implements universal function dispatching and promotion (which
* is necessary to happen before dispatching).
* This is part of the UFunc object. Promotion and dispatching uses the
* following things:
*
* - operand_DTypes: The datatypes as passed in by the user.
* - signature: The DTypes fixed by... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_arithm_fp.dispatch.c.src | /*@targets
** $maxopt baseline
** sse2 (avx2 fma3)
** neon asimd
** vsx2 vsx3
** vx vxe
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include "simd/simd.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlevel_strided_loops.h"
// Provides the various *... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/reduction.c | /*
* This file implements generic methods for computing reductions on arrays.
*
* Written by Mark Wiebe (mwwiebe@gmail.com)
* Copyright (c) 2011 by Enthought, Inc.
*
* See LICENSE.txt for the license.
*/
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#define _MULTIARRAYMODULE
#define _UMATHMODULE
#define PY_SSIZ... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/ufunc_type_resolution.c | /*
* NOTE: The type resolution defined in this file is considered legacy.
*
* The new mechanism separates type resolution and promotion into two
* distinct steps, as per NEP 43.
* Further, the functions in this file rely on the operands rather than
* only the DTypes/descriptors. They are still called and at this... | 0 |
public_repos/numpy/numpy/_core/src | public_repos/numpy/numpy/_core/src/umath/loops_exponent_log.dispatch.c.src | /*@targets
** $maxopt baseline
** (avx2 fma3) avx512f avx512_skx
**/
#define _UMATHMODULE
#define _MULTIARRAYMODULE
#define NPY_NO_DEPRECATED_API NPY_API_VERSION
#include <float.h>
#include "numpy/npy_math.h"
#include "simd/simd.h"
#include "npy_svml.h"
#include "loops_utils.h"
#include "loops.h"
#include "lowlev... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.