-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoiding transpose #7
Comments
Ok I see, that starts to ring a bell, yes. One thing that would need to be clarified maybe is how to deal with more than 2D. Like what if you have a 3D object. then one needs to |
I haven't looked at the use of more than 2D objects in Tasmanian, but I see they have multi-index support and hierarchical grids.
We probably shouldn't make assumption about the dimensions of the arrays that Tasmanian.jl accept and leave it to the user to prepare that memory block correctly.
In the current implementation, you have transpose on lines 106, 118 and 164
Best
Michel
…________________________________
From: Florian Oswald ***@***.***>
Sent: Tuesday, November 14, 2023 8:49 AM
To: floswald/Tasmanian.jl
Cc: Michel Juillard; Author
Subject: Re: [floswald/Tasmanian.jl] Avoiding transpose (Issue #7)
Ok I see, that starts to ring a bell, yes. One thing that would need to be clarified maybe is how to deal with more than 2D. Like what if you have a 3D object. then one needs to reshape ones array into 2D first. correct? Also, in which way is the current implementation "wrong" here - I can't see any transpose operation:
https://github.com/floswald/Tasmanian.jl/blob/81ce15844119e7cd3437078163c77de1b3e64308/src/TSG.jl#L124C5-L124C5
—
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAEOULGG2TBS34UZSXNT67TYEMO7JAVCNFSM6AAAAAA7JYSAMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZGY4TGMBZGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
ah yes, I see. I was looking at Line 164 in 81ce158
which seems hard to avoid. in the end you always need to strip away all dimension info from the array and supply a 1D vector to tasmanian. |
Not really, in Julia you pass to ccall()l a pointer to a Julia array with any number of dimensions. Tasmanian C library will reinterpret it as a vector. So what matters is only the order of the elements in the continuous memory block containing the Julia array.
For evaluateBatch() we can avoid the transpose by requesting that the columns and rows of the vals matrix be exchanged
Best
Michel
…________________________________
From: Florian Oswald ***@***.***>
Sent: Tuesday, November 14, 2023 9:25 AM
To: floswald/Tasmanian.jl
Cc: Michel Juillard; Author
Subject: Re: [floswald/Tasmanian.jl] Avoiding transpose (Issue #7)
ah yes, I see. I was looking at loadNeededPoints! only. indeed i'm seeing this one
https://github.com/floswald/Tasmanian.jl/blob/81ce15844119e7cd3437078163c77de1b3e64308/src/TSG.jl#L164
which seems hard to avoid. in the end you always need to strip away all dimension info from the array and supply a 1D vector to tasmanian.
—
Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAEOULCYWOBZLV3HEYCSERLYEMTHNAVCNFSM6AAAAAA7JYSAMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZG4ZTQMBUHE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Example:
The text was updated successfully, but these errors were encountered: