-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Description
I have been developing complex type support for pytorch since #755. And I found that I had to use complex number in cpp because ATen or previously the THPP library is in cpp and thrust is a cpp library too. And here is two main reason for this name change:
- Readability when complex number is added to the library, it can be confusing to use
realfor generic type. - It can be dangerous in cpp, all cpp's complex types has a function
realwhich is conflict to current generic type namerealand developer has to be very careful.
And I guess this should be decided as early as possible or there could be more code using real. I write a very simple python script for the name changing, see:
https://gist.github.com/Roger-luo/0fd0301f06901fb19d97bdac12c8563d
target name is set to ntype (number type) by default, it does not have any conflict with current names and the processed source code can be compiled on my GPU server on v0.3.1.
Let's decide which name we are going to use and see if I could make a pull request for this if this idea is welcome.
Bests,
Roger