GPUifyLoops.jl icon indicating copy to clipboard operation
GPUifyLoops.jl copied to clipboard

Overdub print/println

Open charleskawczynski opened this issue 5 years ago • 5 comments

Can we overdub print and println as we do for sin, cos etc.? We may compromise with printed warnings instead of errors in #393.

charleskawczynski avatar Jan 22 '20 16:01 charleskawczynski

@vchuravy is this an easy fix?

charleskawczynski avatar Jan 31 '20 23:01 charleskawczynski

If I understand you right you want to be able to turn a println into a @cuprintln?

I am afraid that isn't easily overdubbed, since @cuprintln is a macro and not a function call. There might be some way around this, but I am not sure how to make it pretty...

vchuravy avatar Feb 05 '20 02:02 vchuravy

Hmmm, would it work with @printf and @cuprintln?

I guess still not pretty as they're different macro names and one adds a new line.

ali-ramadhan avatar Feb 05 '20 02:02 ali-ramadhan

If I understand you right you want to be able to turn a println into a @cuprintln?

Yes, exactly.

There might be some way around this, but I am not sure how to make it pretty...

How ugly might a hacky version look? It would be used in a relatively isolated part of the code (famous last words).

charleskawczynski avatar Feb 05 '20 03:02 charleskawczynski

No the issue is the macro nature of it. So we have to implement the macro again.

On Tue, Feb 4, 2020, 21:17 Ali Ramadhan [email protected] wrote:

Hmmm, would it work with @printf and @cuprintln?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vchuravy/GPUifyLoops.jl/issues/104?email_source=notifications&email_token=AABDO2SKUVXSX76TTB4G53LRBIOUBA5CNFSM4KKIOKL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKZ472I#issuecomment-582209513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDO2QODKUXXSNRMLICKYDRBIOUBANCNFSM4KKIOKLQ .

vchuravy avatar Feb 05 '20 05:02 vchuravy