-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add C# wrapper #60
Add C# wrapper #60
Conversation
AnnService/inc/Core/SearchQuery.h
Outdated
std::unique_ptr<BasicResult[]> m_results; | ||
|
||
std::unique_ptr<ByteArray[]> m_metadatas; | ||
std::shared_ptr<BasicResult> m_results; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you do need a shared_array, maybe it is better to convert ByteArray into a template
Wrappers/inc/CsharpCommon.i
Outdated
struct WrapperArray | ||
{ | ||
void * _data; | ||
size_t _size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please always use space instead of tab
AnnService/inc/Core/SearchQuery.h
Outdated
{ | ||
std::copy(p_other.m_metadatas.get(), p_other.m_metadatas.get() + m_resultNum, m_metadatas.get()); | ||
} | ||
std::memcpy(m_results.Data(), p_other.m_results.Data(), sizeof(BasicResult) * m_resultNum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BasicResult is not POD, please use std::copy instead of memcpy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not familiar with swig with C#, please carefully test it before merge.
Add C# wrapper (microsoft#60)
* remove dup code * Update Readme.md * Fix DataSet GNU compile fail bug * fix GNU Windows align alloc bugs * add copyright in each file * fix copy right in dataset * change kdt distance judgement * change code structure and add more wrappers * Update docs * fix search result * change IndexBuilder to support binary input data * temp remove java related projects * remove javaclient and javacore from the windows build * Fix SetData issue * Add vector record count and dimension for reuse and debug * change default parameter definition * add uint8 support * small fix for cosine distance of uint8 * fix AVX distance calculation epu8 * update readme * Update DistanceUtils.h * fix python wrapper cannot load larger than 4G memory error * try to add C# wrapper * fix owner of C# wrapper * add C# cmake support * fix byte array copy * fix tab to space * Try to make shared_ptr<T> as Array template * fix copy
No description provided.