Skip to content

name change for generic type #4575

@Roger-luo

Description

@Roger-luo

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:

  1. Readability when complex number is added to the library, it can be confusing to use real for generic type.
  2. It can be dangerous in cpp, all cpp's complex types has a function real which is conflict to current generic type name real and 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions