You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Situation
I changed to compile vector constructors to compound literals as (float3){ 0.0f, 0.0f, 0.0f }, not functions as make_float3( 0.0f, 0.0f. 0.0f ) in 9bb5706.
This change enables that global variable definitions and vector constructors are compiled to the same syntax, actually struct initializers for global variables and compound literals for vector constructors.
(defglobal x (float3 0.0 0.0 0.0))
=>
__device__ float3 x = (float3){ 0.0f, 0.0f, 0.0f };
Situation
I changed to compile vector constructors to compound literals as
(float3){ 0.0f, 0.0f, 0.0f }
, not functions asmake_float3( 0.0f, 0.0f. 0.0f )
in 9bb5706.This change enables that global variable definitions and vector constructors are compiled to the same syntax, actually struct initializers for global variables and compound literals for vector constructors.
and
Problem
But it does not work on Windows because MSVC does not support compound literals (#70).
Solution
To fix this, we should treat initialization and construction as different concepts as C/C++ does.
The text was updated successfully, but these errors were encountered: