Skip to content

Conversation

@WestonJB
Copy link
Collaborator

@WestonJB WestonJB commented Feb 5, 2026

axpy, scal, copy, and swap can support n > number of threads

@WestonJB WestonJB marked this pull request as ready for review February 5, 2026 18:22
Comment on lines +24 to +26
y[global_i*incy] += a * x[global_i*incx]

else:
Copy link
Owner

Choose a reason for hiding this comment

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

I think this should cover both cases. If global_i < n, the for-loop terminates after the first iteration

if (global_i < n):
y[global_i*incy] = x[global_i*incx]

else:
Copy link
Owner

Choose a reason for hiding this comment

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

same here

if (global_i < n):
x[global_i*incx] *= a

else:
Copy link
Owner

Choose a reason for hiding this comment

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

and here

x[global_i * incx] = y[global_i * incy]
y[global_i * incy] = tmp

else:
Copy link
Owner

Choose a reason for hiding this comment

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

and here

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.

2 participants