Skip to content

Adding wrappers for device math functions and polar decomposition #349

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

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from

Conversation

cmcrook5
Copy link

@cmcrook5 cmcrook5 commented Jun 2, 2025

Added LvArray wrappers for ceil, floor, and power math functions that were previously missing from the develop branch. Also include polarDecomposition from Stefan's previous work.

@cmcrook5 cmcrook5 changed the title Feature/crook5/math Adding wrappers for device math functions and polar decomposition Jun 3, 2025
@cmcrook5 cmcrook5 requested review from wrtobin and rrsettgast June 3, 2025 15:44
@cmcrook5 cmcrook5 force-pushed the feature/crook5/math branch from c52307f to c3fcf1f Compare June 3, 2025 16:03
@cmcrook5 cmcrook5 self-assigned this Jun 17, 2025
Copy link
Collaborator

@corbett5 corbett5 left a comment

Choose a reason for hiding this comment

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

Marginal comments aside it looks good to me. I'd just add some tests for the math functions you added too.

The tensorOps stuff is pretty convoluted, but it looks you figured it out. Hope it wasn't too much trouble.

@@ -249,7 +249,7 @@ class ArrayOfArraysView

/**
* @brief Move assignment operator..
* @param src the SparsityPatternView to be moved from.
* @param src the ArrayOfArraysView to be moved from.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

@@ -340,7 +340,7 @@ class ChaiBuffer

if( size > 0 )
{
LVARRAY_ERROR_IF_NE_MSG( space, MemorySpace::host, "Calling reallocate with a non-zero current size is not yet supporeted for the GPU." );
LVARRAY_ERROR_IF_NE_MSG( space, MemorySpace::host, "Calling reallocate with a non-zero current size is not yet supported for the GPU." );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice


#if defined( LVARRAY_USE_DEVICE )

/// @copydoc ceil( T )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unless you added tests for __half I'd just get rid of them.

@@ -484,4 +484,21 @@ class ArrayOfArrays : protected ArrayOfArraysView< T, INDEX_TYPE, false, BUFFER_
}
};

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little unsure if this should go here or in GEOS itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants