- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I'm trying to parallelize convolution/correlation, so I wonder if can I asynchonously call vslConvCopyTask in another thread while main thread executes a convolution/correlation operation ? Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you give it a try? It sounds do-able if the main thread doesn't edit the task. Is the time spent on vslConvCopyTask comparable to the time on execution in you case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need guarantees it is an allowed and safe operation in a multithreaded environment (using single threaded mkl).
Even if I try and it works, it doesn't mean it won't break in production. ATM. I'm creating new plan with same arguments for each new thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The guaranteed safe way of copying the task from the main thread and doing the subsequent execution is to wait for all the threads to finish the copy operation first.
Thread0 -- create task0 --- wait all threads to copy --- execute task0
Thread1 --------------------- copy task 0 to task1 ----- execute task1
Thread2 --------------------- copy task 0 to task2 ----- execute task2

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page