faiss 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -7
- data/ext/faiss/extconf.rb +5 -3
- data/ext/faiss/numo.hpp +4 -4
- data/ext/faiss/utils.cpp +1 -1
- data/ext/faiss/utils.h +1 -1
- data/lib/faiss/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106966f6d5e7f6a3f5237a2ebb59912304bbe319ba2891c45166c753fc0e9df1
|
4
|
+
data.tar.gz: 3d72777c777d75beb15c09cb223c4e63f188b7e89fab06d6fa9268bc2be4ff59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d822fd4e0850dd667aba09a02f81c43e2afde90a6d88fff1e631539a8d47f42b4dfe0705980a6ff8be88b021af805998d1e70b09cd1010302702a1c1363cac
|
7
|
+
data.tar.gz: 24e4febd81142150541199523f0b1e19a0be7c658e504472778173e38006234ea47f7e362c1396c3135b4449b7ab5229dc027c4bcea59c880902e1fa23e3c956
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# Faiss
|
1
|
+
# Faiss Ruby
|
2
2
|
|
3
3
|
[Faiss](https://github.com/facebookresearch/faiss) - efficient similarity search and clustering - for Ruby
|
4
4
|
|
5
5
|
Learn more about [Faiss](https://engineering.fb.com/data-infrastructure/faiss-a-library-for-efficient-similarity-search/)
|
6
6
|
|
7
|
-
[](https://github.com/ankane/faiss/actions)
|
7
|
+
[](https://github.com/ankane/faiss-ruby/actions)
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -220,22 +220,22 @@ Numo::NArray.cast([[1, 2, 3], [4, 5, 6]])
|
|
220
220
|
|
221
221
|
## History
|
222
222
|
|
223
|
-
View the [changelog](https://github.com/ankane/faiss/blob/master/CHANGELOG.md)
|
223
|
+
View the [changelog](https://github.com/ankane/faiss-ruby/blob/master/CHANGELOG.md)
|
224
224
|
|
225
225
|
## Contributing
|
226
226
|
|
227
227
|
Everyone is encouraged to help improve this project. Here are a few ways you can help:
|
228
228
|
|
229
|
-
- [Report bugs](https://github.com/ankane/faiss/issues)
|
230
|
-
- Fix bugs and [submit pull requests](https://github.com/ankane/faiss/pulls)
|
229
|
+
- [Report bugs](https://github.com/ankane/faiss-ruby/issues)
|
230
|
+
- Fix bugs and [submit pull requests](https://github.com/ankane/faiss-ruby/pulls)
|
231
231
|
- Write, clarify, or fix documentation
|
232
232
|
- Suggest or add new features
|
233
233
|
|
234
234
|
To get started with development:
|
235
235
|
|
236
236
|
```sh
|
237
|
-
git clone --recursive https://github.com/ankane/faiss.git
|
238
|
-
cd faiss
|
237
|
+
git clone --recursive https://github.com/ankane/faiss-ruby.git
|
238
|
+
cd faiss-ruby
|
239
239
|
bundle install
|
240
240
|
bundle exec rake compile
|
241
241
|
bundle exec rake test
|
data/ext/faiss/extconf.rb
CHANGED
@@ -5,10 +5,12 @@ abort "BLAS not found" unless have_library("blas")
|
|
5
5
|
abort "LAPACK not found" unless have_library("lapack")
|
6
6
|
abort "OpenMP not found" unless have_library("omp") || have_library("gomp")
|
7
7
|
|
8
|
-
numo =
|
9
|
-
abort "Numo not found" unless
|
8
|
+
numo = File.join(Gem.loaded_specs["numo-narray"].require_path, "numo")
|
9
|
+
abort "Numo not found" unless find_header("numo/narray.h", numo)
|
10
10
|
|
11
|
-
|
11
|
+
# -march=native not supported with ARM Mac
|
12
|
+
default_optflags = RbConfig::CONFIG["host_os"] =~ /darwin/i && RbConfig::CONFIG["host_cpu"] =~ /arm|aarch64/i ? "" : "-march=native"
|
13
|
+
$CXXFLAGS << " -std=c++17 $(optflags) -DFINTEGER=int " << with_config("optflags", default_optflags)
|
12
14
|
|
13
15
|
ext = File.expand_path(".", __dir__)
|
14
16
|
vendor = File.expand_path("../../vendor/faiss", __dir__)
|
data/ext/faiss/numo.hpp
CHANGED
@@ -24,19 +24,19 @@ namespace numo {
|
|
24
24
|
return this->_value;
|
25
25
|
}
|
26
26
|
|
27
|
-
size_t ndim() {
|
27
|
+
size_t ndim() const {
|
28
28
|
return RNARRAY_NDIM(this->_value);
|
29
29
|
}
|
30
30
|
|
31
|
-
size_t* shape() {
|
31
|
+
size_t* shape() const {
|
32
32
|
return RNARRAY_SHAPE(this->_value);
|
33
33
|
}
|
34
34
|
|
35
|
-
size_t size() {
|
35
|
+
size_t size() const {
|
36
36
|
return RNARRAY_SIZE(this->_value);
|
37
37
|
}
|
38
38
|
|
39
|
-
bool is_contiguous() {
|
39
|
+
bool is_contiguous() const {
|
40
40
|
return nary_check_contiguous(this->_value) == Qtrue;
|
41
41
|
}
|
42
42
|
|
data/ext/faiss/utils.cpp
CHANGED
data/ext/faiss/utils.h
CHANGED
data/lib/faiss/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: faiss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rice
|
@@ -259,7 +259,7 @@ files:
|
|
259
259
|
- vendor/faiss/faiss/utils/simdlib_neon.h
|
260
260
|
- vendor/faiss/faiss/utils/utils.cpp
|
261
261
|
- vendor/faiss/faiss/utils/utils.h
|
262
|
-
homepage: https://github.com/ankane/faiss
|
262
|
+
homepage: https://github.com/ankane/faiss-ruby
|
263
263
|
licenses:
|
264
264
|
- MIT
|
265
265
|
metadata: {}
|
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
278
|
- !ruby/object:Gem::Version
|
279
279
|
version: '0'
|
280
280
|
requirements: []
|
281
|
-
rubygems_version: 3.2.
|
281
|
+
rubygems_version: 3.2.32
|
282
282
|
signing_key:
|
283
283
|
specification_version: 4
|
284
284
|
summary: Efficient similarity search and clustering for Ruby
|