Skip to content

Why using signed integer instead of unsigned for index/size? #2222

Answered by awni
zcbenz asked this question in Q&A
Discussion options

You must be logged in to vote

For the contiguous ops it doesn't matter.. I think they could be unsigned. In some cases (e.g. for the non-contiguous ops) we use signed integers because strides can be negative. I think the use of signed integers in the contiguous ops is just a by product of that as the earlier logic is simpler.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zcbenz
Comment options

Answer selected by zcbenz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants