Skip to content
  1. Dec 09, 2016
  2. Dec 08, 2016
  3. Dec 07, 2016
  4. Dec 06, 2016
  5. Dec 05, 2016
  6. Dec 04, 2016
  7. Dec 03, 2016
    • Andreas Klöckner's avatar
      Merge branch 'elif-else' into 'master' · 5afb9fb2
      Andreas Klöckner authored
      Elif else updates
      
      Migrating pull request from https://github.com/inducer/loopy/pull/65 to gitlab by request
      
      Note: issue brought up on github is still open:
      
      @inducer there is a bug in here I can't quite figure out.  In the test added in 8e8bd1d0, the generated wrapper reads as:
      
      ```
      def _lpy_host_loopy_kernel(_lpy_cl_kernels, queue, a, wait_for=None, allocator=None):
          from struct import pack as _lpy_pack
          import pyopencl as _lpy_cl
          import pyopencl.tools
      
          if allocator is None:
              allocator = _lpy_cl_tools.DeferredAllocator(queue.context)
      
      
          _global_temporaries = []
      
          if (i % 2) == 0:
              pass
              # {{{ enqueue loopy_kernel
      
              _lpy_knl = _lpy_cl_kernels.loopy_kernel
              assert _lpy_knl.num_args == 1
      
              pass
              _lpy_knl.set_arg(0, a)
              _lpy_evt = _lpy_cl.enqueue_nd_range_kernel(queue, _lpy_knl, (1,), (1,),  wait_for=wait_for, g_times_l=True)
              wait_for = [_lpy_evt]
      
              # }}}
      
      
          for _tv in _global_temporaries:
              _tv.release()
      
          return _lpy_evt
      ```
      
      Note the `if (i %2) == 0:` in there!  `i` is not defined, this causes an error on execution, I am not sure how it get introduced into the wrapper at all.
      
      Note that the test isn't fully correct either (I didn't bother to finish it as I couldn't figure out where the wrapper error was coming from)
      
      See merge request !43
      5afb9fb2
    • Nick Curtis's avatar
      d'oh, append correct object · 264ddadd
      Nick Curtis authored
      264ddadd
    • Nick Curtis's avatar
      initialize first entries on the if_stack to have the correct insn_predicates... · 911feb37
      Nick Curtis authored
      initialize first entries on the if_stack to have the correct insn_predicates in case it's immediately popped off
      911feb37
    • Nick Curtis's avatar
Loading