我試圖設置新的__local浮點數,但當我將float的大小作爲參數傳遞時出現錯誤。在OpenCL中設置__local浮點數
此代碼給出錯誤:
int TILE_DIM = get_local_size(0)*get_local_size(1); //local size
__local float buffer[TILE_DIM];
此代碼不:
int TILE_DIM = get_local_size(0)*get_local_size(1); //local size
__local float buffer[512];