Antoine Pitrou <pit...@free.fr> added the comment:

> I used half-float in GPU programming and from my perspective it was
> just native. There are no half-float in C, right. But there are
> half-floats used in NVIDIA libraries for example and I like to think
> used format is native and platform-depended in general. Correct me if
> I'm mistaking.

By "native", the struct module means there is a corresponding C type and
therefore corresponding rules for size and alignment, as implemented by
the C compiler. GPU structure layout is another matter, as the C
compiler doesn't target that (not in a standard setup, anyway).

Apparently the patch takes the stance that the corresponding C type (for
size and alignment) is "short", which I guess is an acceptable
compromise, but still a bit weird.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11734>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to