You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the functions that are supported in GFor also normally support batching. For example, if you wanted to do a convolve on a 2D image, you can have multiple 2D images batching into a 3D array and run the convolve on that.
Is there any specific function that you would like supported?
Essentially what I am looking to do is pretty simple, add different size arrays together(i.e. a 3 row x 1 col array + 3 row by 5 col array, add the 3x1 to each column of the 3x5) or perform a custom function on all rows of an array. I.e., apply function f(x1,x2,x3,x4,x5) to n times to rows of array y[n row x 5 cols]. I apologize if this functionality can be accomplished with functions already implemented, I am a newbie in regards to ArrayFire, but looking to learn!
@gualandri43 you shouldn't need either GFOR or batchfunc for the second part. All our functions work on all the vectors in parallel.
If you have a specific code that you are having a problem with, drop by on our chat room and we'll see if we can help you out: https://gitter.im/arrayfire/arrayfire
Activity
shehzan10 commentedon Sep 9, 2016
Most of the functions that are supported in GFor also normally support batching. For example, if you wanted to do a convolve on a 2D image, you can have multiple 2D images batching into a 3D array and run the convolve on that.
Is there any specific function that you would like supported?
gualandri43 commentedon Sep 9, 2016
Essentially what I am looking to do is pretty simple, add different size arrays together(i.e. a 3 row x 1 col array + 3 row by 5 col array, add the 3x1 to each column of the 3x5) or perform a custom function on all rows of an array. I.e., apply function f(x1,x2,x3,x4,x5) to n times to rows of array y[n row x 5 cols]. I apologize if this functionality can be accomplished with functions already implemented, I am a newbie in regards to ArrayFire, but looking to learn!
pavanky commentedon Sep 9, 2016
@gualandri43 In these cases
tileshould do it. It does not actually replicate the arrays but just changes the metdata.I am giving the example in C++, you can probably figure it for C#.
This works.
Alternatively, there is a function called
batchFuncin arrayfire that can be used if ported.gualandri43 commentedon Sep 9, 2016
@pavanky Thank you for the suggestion about tiling, that should take care of the first part quite nicely.
batchFunc looks exactly like what I was thinking for the second part (apply custom function across rows of array). Is that able to be ported over?
pavanky commentedon Sep 9, 2016
@gualandri43 you shouldn't need either GFOR or batchfunc for the second part. All our functions work on all the vectors in parallel.
If you have a specific code that you are having a problem with, drop by on our chat room and we'll see if we can help you out: https://gitter.im/arrayfire/arrayfire
gualandri43 commentedon Sep 9, 2016
Alright, I will experiment further and see what I can figure out. Thanks again!