Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions LICENSES/XSIMD_LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Wolf Vollprecht and Martin Renou
Copyright (c) 2016, QuantStack
Copyright (c) 2018, Serge Guelton
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 3 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ add_project_arguments(
)

cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
if cc.get_id() == 'msvc'
# Tracking issue: https://github.com/pandas-dev/pandas/issues/63701
# Ignore some MSVC specific warnings:
# C4244: possible loss of data in conversion. Reproductible with `-Wconversion`.
# C4267: conversion from `size_t` to smaller type.
# C4551: occurs due to Cython generating code with (void)func.
# https://github.com/cython/cython/issues/3579
# C4146: unary minus operator applied to unsigned type. Occurs in xsimd.
add_project_arguments(
['/wd4244', '/wd4267', '/wd4551'],
['/wd4244', '/wd4267', '/wd4551', '/wd4146'],
language: ['c', 'cpp'],
)
endif
Expand Down
3 changes: 3 additions & 0 deletions pandas/_libs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ _khash_primitive_helper_dep = declare_dependency(
m_dep = cc.find_library('m', required: false)
fast_float = subproject('fast_float')
fast_float_dep = fast_float.get_variable('fast_float_dep')
xsimd_dep = dependency('xsimd', version: '>=14.2')

subdir('simd')

subdir('tslibs')

Expand Down
20 changes: 20 additions & 0 deletions pandas/_libs/simd/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
host_cpu = host_machine.cpu_family()

simd_config = configuration_data()
if host_cpu == 'aarch64'
simd_target = 'neon'
simd_config.set('PANDAS_HAVE_NEON', 1)
elif host_cpu == 'x86_64'
simd_target = 'sse2'
simd_config.set('PANDAS_HAVE_SSE2', 1)
else
simd_target = 'scalar'
simd_config.set('PANDAS_HAVE_SCALAR', 1)
endif

configure_file(
output: 'pandas_simd_config.h',
configuration: simd_config,
)

simd_config_inc = include_directories('.')
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ license-files = [
"LICENSES/PYUPGRADE_LICENSE", # MIT
"LICENSES/SAS7BDAT_LICENSE", # MIT
"LICENSES/ULTRAJSON_LICENSE", # BSD-3-Clause AND TCL
"LICENSES/XSIMD_LICENSE", # BSD-3-Clause
"subprojects/fast_float-*/LICENSE-APACHE", # Apache-2.0
"subprojects/fast_float-*/LICENSE-BOOST", # BSL
"subprojects/fast_float-*/LICENSE-MIT", # MIT
Expand Down
12 changes: 12 additions & 0 deletions subprojects/packagefiles/xsimd/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
project(
'xsimd',
'cpp',
meson_version: '>=0.58.0',
license: 'BSD-3-Clause',
version: '14.2.0',
)

xsimd_inc = include_directories('include')

xsimd_dep = declare_dependency(include_directories: xsimd_inc)
meson.override_dependency('xsimd', xsimd_dep)
9 changes: 9 additions & 0 deletions subprojects/xsimd.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-file]
directory = xsimd-14.2.0
source_url = https://github.com/xtensor-stack/xsimd/archive/refs/tags/14.2.0.tar.gz
source_filename = xsimd-14.2.0.tar.gz
source_hash = 21e841ab684b05331e81e7f782431753a029ef7b7d9d6d3ddab837e7782a40ee
patch_directory = xsimd

[provide]
dependency_names = xsimd
Loading