Skip to content

PyDistance is a set of distance measure implementations optimized for a variety of processors with SIMD support written in C++, able to be used from Python.

License

Notifications You must be signed in to change notification settings

hpc-fci-mackenzie/PyDistance

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyDistance master Branch Build Status

PyDistance is a set of distance measure implementations optimized for a variety of processors with SIMD support able to be used from Python.

Requirements

CMake >= 3.10

Supported AVX Instruction Sets

AVX Instruction Set SIMD_WIDTH option
Auto Vectorization auto
AVX-128 128
AVX-256 256
AVX-512 512

Building

The setting SIMD_WIDTH may be specified to take full advantage of the target architecture, as follows:

$ mkdir build 
$ cd build
$ cmake .. [-D SIMD_WIDTH=<auto|128|256|512>]
$ make
$ cd lib

Usage

>>> import PyDistance as pd
>>> import numpy as np
>>> a=np.random.randint(0, 10, 8)
>>> a
array([4, 3, 5, 1, 4, 5, 7, 7])
>>> b=np.random.randint(0, 10, 8)
>>> b
array([1, 3, 3, 4, 1, 4, 3, 6])
>>> pd.euclidean(a,b)
7.0

Platforms

alt text alt text alt text

Contributing

PyDistance is a research project and for now, we are a small team! We actively encourage and support contributions. The source code is released under the GNU License.

About

PyDistance is a set of distance measure implementations optimized for a variety of processors with SIMD support written in C++, able to be used from Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 69.4%
  • CMake 14.8%
  • C 11.2%
  • Python 4.6%