Hey Philippe, all, After talking earlier about switch_context() and current_context(), I'm not sure why I should have to call these explicitly in most cases. If I'm performing an operation on two objects (both explicitly constructed with the same context), shouldn't ViennaCL implicitly switch_context() so that the current_context is that of the two objects in the operation?
In this case, I'm copying data to a vector, and the device-specific kernel uses current_context() (which returns a different context to that with which the vector was constructed, thus giving an invalid command queue). Shouldn't the relevant dispatch function compare current_context() with that of the operand(s), and if current_context() is different, call switch_context()? Is there any case where this wouldn't work, and switch_context() would need to be called by the user explicitly? I think we should be able to assume that the user will always provide operands each with the same context; at least, I guarantee that this is the case in PyViennaCL. Cheers, Toby ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ ViennaCL-devel mailing list ViennaCL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viennacl-devel