m4rs-mt / ILGPU

ILGPU JIT Compiler for high-performance .Net GPU programs

Home Page:http://www.ilgpu.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG]: Variable naming

laurentchougrani opened this issue · comments

Describe the bug

I stumble upon something yesterday while playing with ILGpu :

  • naming a variable "Position" causes au compilation error : the variable is automatically registered as an int8 (my "Position was a Vector3).
    The inner exception is : "Cannot convert from 'Int8' to type 'Struct<Float32 [0], Float32 [4], Float32 [8]>"

Environment

  • ILGPU version: [e.g., 1.5.1]
  • .NET version: [e.g., .NET 8]
  • Operating system: [e.g., Windows 10]
  • Hardware (if GPU-related): [e.g., NVIDIA GeForce GTX 1080]

Steps to reproduce

1 create a struct with a variable "Position" that is not an int8
2 Map an Action where the "whatever" contains a method that calls for the "Position" variable.
3 the mapping geenrate an exception

Expected behavior

naming a variable should not infer its type.

Additional context

No response

hi @laurentchougrani. Can you please provide some sample code the reproduces the issue? Ideally, this would be a minimal project that can be compiled and demonstrates your issue.