0

I am getting Found more than one basic block without predecessors exception:

enter image description here

When trying to execute following code:

    static void Main(string[] args)
    {
        var gpu = Gpu.Default;
        gpu.For(0, 100, idx => Do(idx)); // on this line

        Console.ReadKey();
    }

    [GpuManaged]
    public static void Do(int idx)
    {
        bool isTrue = false;
    }

What could be the issue? No exception is thrown when [GpuManaged] is not used

  • win 10 x64
  • alea 3.0.4
  • alea.fody 3.0.4
  • fsharp.core 4.3.4
  • geforce GT 710
Alex
  • 4,607
  • 9
  • 61
  • 99
  • But this code doesn't make sense, so probably not worth trying to figure out why it doesn't work. Try with some real code. – Evk Apr 17 '18 at 15:28
  • @Evk this code is just a simplified version of my "more complicated code". I don't think anyone would benefit from seeing it. If I am not able to resolve issue for as simple as this version of code - then there is no reason trying more bloated version.. I also want to avoid raising unnecessary questions in regards to something being not implemented to "code standards". If you are still interested - in the following thread - attribute `[GpuManaged]` can not be set for `Do2()`: https://stackoverflow.com/questions/49883187/monitor-blinks-and-program-throws-exception-when-using-alea – Alex Apr 17 '18 at 16:32
  • Note he created 2 questions about the same issue, see: https://stackoverflow.com/questions/49881644/visualstudio-shows-an-error-when-adding-gpumanaged-attribute that one has more detail so this one should probably be deleted. – Dave S Apr 17 '18 at 18:15
  • @DaveS the errors are different are are reproduced under different circumstances. The only thing in common is the attribute. – Alex Apr 18 '18 at 11:59

0 Answers0