Data type refactor - #2758
Draft
timfelle wants to merge 23 commits into
Draft
Conversation
Rank-3 and rank-4 counterparts to vector_t/matrix_t (src/math/), with the same device-mirrored alloc/free, copy_from, and assignment(=) pattern as matrix_t. Re-exported from src/neko.f90 alongside vector_t/matrix_t. Includes pFUnit unit tests wired into make check. Verified on CPU (45/45 unit tests) and CUDA (sm_86, RTX A3000 Laptop GPU, 45/45 unit tests) backends. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
field_t no longer declares its own x/name/x_d - it inherits them via extends(tensor4_t), delegating alloc/free/device-map to the parent instead of hand-rolling them. Dropped field_size/field_copy_from and the separate assign_scalar (all identical to the inherited tensor4_t versions). tensor4_t's init is now a generic wrapping a private init_dims so it can be cleanly overridden; field_t seals the two raw tensor4-level entry points (init_dims, tensor4_assign_tensor4) that would otherwise bypass Xh/msh/dof. Verified on CPU and CUDA (sm_86): 45/45 unit tests pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work on refactoring our data types. This work extends on the tensor system and unifies our array objects under a single umbrella. The array type implements storage, while specialised types create a pointer with the appropriate shape, matrix is 2D etc.
array_t, the parent of all arrays. Linear storage and handles the common interfaces such as allocation, device synchronisation etc.array_tsystem. (vector,matrix, ... )field_tto the same underlying structure.This PR depends on #2749 #2756