[Bug 105869] clang crashes when compiling OpenCL kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 1 on bug 105869 from
What is the clang/llvm version? I cannot reproduce using clang-5.0.1:
$ cat foo.cl 
#pragma OPENCL EXTENSION cl_khr_fp64: enable

kernel void PulseWave(global float* buffer, size_t num_harmonics,
        float duty_cycle)
{
        size_t index = get_global_id(0);
        float phase = buffer[index];
        float sample = duty_cycle;
        float precompute1 = (phase - duty_cycle / 2.0) * 2.0 * M_PI;
        for (size_t i = 1; i <= num_harmonics; ++i)
        {
                float harmonic = 2.0 / (i * M_PI) * sin(M_PI * i * duty_cycle)
*
                        cos(i * precompute1);
                sample += harmonic;
        }
        buffer[index] = sample * 2.0 - 1.0;
}

$ clang-5.0 -target amdgcn-mesa-mesa3d -Xclang -mlink-bitcode-file -Xclang
/usr/lib64/clc/carrizo-amdgcn-mesa-mesa3d.bc  -include clc/clc.h -S foo.cl

$ clang-5.0 --version
clang version 5.0.1 (tags/RELEASE_501/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux