Re: [CUDPP][922] Use CUDPP in existing project

44 views
Skip to first unread message

Mark Harris

unread,
Sep 10, 2012, 10:04:30 PM9/10/12
to cu...@googlegroups.com
Yes, this is possible.  See the cudppTestrig tests for example usage.  You may also find Thrust useful for simple tasks like this.

On Tue, Sep 11, 2012 at 6:31 AM, Adhiraj Mahabali <adhiraj...@gmail.com> wrote:
Hi, I'm designing app for CUDA where i need to compaction of my existing 1D array.
This array is allocated using cudaMalloc() and some other kernel populates this array. so after this population I would like to use cudppCompact() . Can anyone please help me with this thing?

--
You received this message because you are subscribed to the Google Groups "CUDPP" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cudpp/-/ua3J8rRFho4J.

To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cudpp+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cudpp?hl=en.

Adhiraj Mahabali

unread,
Sep 11, 2012, 4:07:18 PM9/11/12
to cu...@googlegroups.com
I tried with Thrust and it turn out to be a time-consuming process so I wanted to try CUDPP.
I've an array which contains 0's and non-zero elements. I cannot afford to have separate "flag" array to explicitly pass it on cudppCompact().
Ex. A={0,3,4,0,0}
Now I've to compact it.. Thrust provides such function(copy_if). How should I do it in CUDPP?

Mark Harris

unread,
Sep 11, 2012, 6:33:41 PM9/11/12
to cu...@googlegroups.com
I believe that you can pass the same pointer for the input and flag arrays (but the output must be a separate array) to cudppCompact. Try it and see if it works.

Mark

madhur amilkanthwar

unread,
Sep 11, 2012, 6:43:19 PM9/11/12
to cu...@googlegroups.com
Sorry to interrupt.My app required same functionality, I used Thrust and YES thrust is slow.
BTW If cudppCompact() expects only 0s and 1s in flag array then It wouldn't work right?
Thank You.
Madhur D. Amilkanthwar
RISE lab,
IIT Madras.

Mark Harris

unread,
Sep 11, 2012, 8:06:38 PM9/11/12
to cu...@googlegroups.com
Good point, Madhur.  I just checked the code, and cudppCompact runs a scan directly on the indices.  So the flags need to be 0 or 1.

Sorry for the misinformation.

Adhiraj Mahabali

unread,
Sep 15, 2012, 4:12:06 AM9/15/12
to cu...@googlegroups.com
Thanks Madhur. You saved my time.

Mark Harris

unread,
Sep 16, 2012, 6:47:38 PM9/16/12
to cu...@googlegroups.com, cu...@googlegroups.com
BTW this might be a useful feature to add if someone wants to request it by filing an issue.

Mark
(on mobile)

madhur amilkanthwar

unread,
Sep 17, 2012, 2:56:17 AM9/17/12
to cu...@googlegroups.com
I'm interested to contribute. Can we help to modify this project?

John Owens

unread,
Sep 17, 2012, 10:26:39 AM9/17/12
to cu...@googlegroups.com
That's a yes-but. We'd like to do another release in the near future
(I'll be in charge of that, kindly note the recent activity), and then
we're thinking about moving to github, which has better support for
a more broadly contributable project ("pull requests" among other
things). So: Stay tuned.

JDO

Mark Harris

unread,
Sep 17, 2012, 5:38:10 PM9/17/12
to cu...@googlegroups.com, cu...@googlegroups.com
Yes, please file an issue on the site as a request to add the feature. Then when you have something working, submit a Patch and we will consider incorporating.

We hope to transition to git in the future which will make it easier.

Mark
(on mobile)
Reply all
Reply to author
Forward
0 new messages