Skip to content

Read Python vecs dimensionality as unsigned int#336

Merged
mihaic merged 2 commits into
intel:mainfrom
mihaic:uint32
May 22, 2026
Merged

Read Python vecs dimensionality as unsigned int#336
mihaic merged 2 commits into
intel:mainfrom
mihaic:uint32

Conversation

@mihaic
Copy link
Copy Markdown
Member

@mihaic mihaic commented May 21, 2026

Document uint32 use in vecs dimensionality and ivecs. Note the differences to http://corpus-texmex.irisa.fr

Use uint32 in examples.

Document uint32 use in vecs dimensionality and ivecs. Note the differences to http://corpus-texmex.irisa.fr

Use uint32 in examples.
@mihaic mihaic enabled auto-merge (squash) May 22, 2026 18:19
@mihaic mihaic merged commit 9b84433 into intel:main May 22, 2026
18 of 20 checks passed
@mihaic mihaic deleted the uint32 branch May 22, 2026 18:49
Copy link
Copy Markdown
Member

@rfsaliev rfsaliev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihaic, can you please fix the compilation error?
Thank you.

return -1;
}
ret = fwrite(v, sizeof(float), d, fo);
if (ret != d) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line causes compilation error aka signed-unsigned mismatch:

In file included from /workspace/ScalableVectorSearch/examples/cpp/shared/shared.cpp:28:
/workspace/ScalableVectorSearch/examples/cpp/shared/utils.h: In function ‘int fvec_fwrite(FILE*, const float*, uint32_t)’:
/workspace/ScalableVectorSearch/examples/cpp/shared/utils.h:35:13: error: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
   35 |     if (ret != d) {
      |         ~~~~^~~~
/workspace/ScalableVectorSearch/examples/cpp/shared/utils.h: In function ‘int ivec_iwrite(FILE*, const uint32_t*, uint32_t)’:
/workspace/ScalableVectorSearch/examples/cpp/shared/utils.h:67:13: error: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
   67 |     if (ret != d) {
      |         ~~~~^~~~

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mihaic mihaic mentioned this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants