Skip to content

Commit 32e9f48

Browse files
authored
Merge bf0da80 into 891497b
2 parents 891497b + bf0da80 commit 32e9f48

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v2.5.3
2+
#### 🐛 Fixes
3+
4+
- fix RAG for iOS (PR: #354)
5+
6+
17
## v2.5.2
28
#### 🚀 Features
39

CHANGELOG.release.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
### 🚀 Features
1+
### 🐛 Fixes
22

3-
- Support Android x86-64 architecture (Magic Leap 2) (PR: #344)
4-
- Combine ARM and Intel architectures of macOS (PR: #345)
3+
- fix RAG for iOS (PR: #354)
54

Runtime/RAG/usearch/NativeMethods.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ namespace Cloud.Unum.USearch
1111
{
1212
public static class NativeMethods
1313
{
14+
#if UNITY_IOS
15+
private const string LibraryName = "__Internal";
16+
#else
1417
private const string LibraryName = "libusearch_c";
18+
#endif
1519

1620
[DllImport(LibraryName, CallingConvention = CallingConvention.Cdecl)]
1721
public static extern usearch_index_t usearch_init(ref IndexOptions options, out usearch_error_t error);

Runtime/RAG/usearch/USearchIndex.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,17 +318,10 @@ private int Search<T>(T[] queryVector, int count, out ulong[] keys, out float[]
318318
}
319319
else
320320
{
321-
if (Application.platform == RuntimePlatform.Android)
321+
lock (filterLock)
322322
{
323-
lock (filterLock)
324-
{
325-
FilterFunction = filter;
326-
matches = checked((int)usearch_filtered_search(this._index, queryVectorPtr, scalarKind, (UIntPtr)count, StaticFilter, IntPtr.Zero, keys, distances, out error));
327-
}
328-
}
329-
else
330-
{
331-
matches = checked((int)usearch_filtered_search(this._index, queryVectorPtr, scalarKind, (UIntPtr)count, (int key, IntPtr state) => filter(key), IntPtr.Zero, keys, distances, out error));
323+
FilterFunction = filter;
324+
matches = checked((int)usearch_filtered_search(this._index, queryVectorPtr, scalarKind, (UIntPtr)count, StaticFilter, IntPtr.Zero, keys, distances, out error));
332325
}
333326
}
334327
HandleError(error);

0 commit comments

Comments
 (0)