Skip to content

added crossproduct to customfields#130

Merged
godsic merged 5 commits intomasterfrom
feature/customfields_crossproduct
Sep 27, 2017
Merged

added crossproduct to customfields#130
godsic merged 5 commits intomasterfrom
feature/customfields_crossproduct

Conversation

@JLeliaert
Copy link
Copy Markdown
Contributor

No description provided.

@JLeliaert JLeliaert requested review from barnex and godsic September 25, 2017 19:46
if (i < N) {
float3 A = {ax[i], ay[i], az[i]};
float3 B = {bx[i], by[i], bz[i]};
dstx[i] = cross(A, B).x;
Copy link
Copy Markdown
Contributor

@godsic godsic Sep 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doing cross(A, B) tree times might not be well optimized by the nvcc. Perhaps something like
float3 AxB = cross(A, B);
dstx[i] = AxB.x;
dsty[i] = AxB.y;
dstz[i] = AxB.z;

@godsic
Copy link
Copy Markdown
Contributor

godsic commented Sep 25, 2017

@JLeliaert which commit introduced Cross(a, b Quantity) ?

Improved performance as suggested by @godsic
@godsic
Copy link
Copy Markdown
Contributor

godsic commented Sep 26, 2017

@JLeliaert thanks. Can you unstage STT wrapper and I am happy to merge then.

@godsic godsic merged commit 74053dd into master Sep 27, 2017
@JonathanMaes JonathanMaes deleted the feature/customfields_crossproduct branch September 26, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants