-
Notifications
You must be signed in to change notification settings - Fork 0
Fh kokkos b spline #3
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
hsiehhRPI
wants to merge
74
commits into
main
Choose a base branch
from
fh_Kokkos_BSpline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
9251c86
Attempt to create constructor for KokkosBSpline
420575e
Attempt derivative coeff function, started eval
0f46eb0
Attempt eval function, need compilation, testing
06ae6f3
Create init test for BSplineKokkos
7e97698
Add BSplineKokkos executable to CMakeLists.txt
c07c382
Fixed some syntax error and templating issues
a6cfa5a
Fix compiling error
789f6bc
Link Kokkos::kokkos to testSplineKokkosBase
333c669
Fixed vector initialization error
fbe5082
Moving constructor from .cpp to .h
9822f38
Moved functions use execution space to .h file
f87d67a
Modified test case to suit the 2D structure
004e5ee
Fixed 1st, 2nd derivative coef function
1b0c522
Added constructor from a vector of kokkos splines
603aee7
fixed 1 spline initialization and test
09b8b83
Multispline constructor, offset problem in progress
8030c59
Fixed ctrlpts, knots offset error
79b1947
First attempt on eval1stDerivative
defbba2
Still debugging derivative coef calculation error
8e4b58c
Fixing 1st deriv coe err 2nd deriv coe in progress
d5707a8
Fixing2nd deriv coe, 1&2 deriv coe need to verify
935a31d
1st attempt at eval2ndDeriv
dfafacb
fixed indent & remove repeat knots, ongoing debug
f788662
fixing indentation to match existing code
bc562b9
fixing memory access error for spline constructors
2b8d27c
Fixing print function
e861781
fixed multi spline constructor offset index
865a5a3
Coeff function adapt with mirror views
c794c9c
eval1stD debug in progress
2289339
Add serial spline & init SplineKokkos w/ same data
6c1196f
Removed weights from constructors and member var
246ed75
Added serial 1st derivative test, wip for kokkos
bcad4bf
Fixing coef calculation in progress
b2a667f
Fixed deriv coef calculation for 1st deriv
9e11d6e
Added simple 2nd deriv test against serial version
dd470d5
Ongoing fix for 2nd deriv coeff
8e7bc8a
Added tests for kokkos 1st derivative
5e4439b
Added test to CMakeLists, 1stDeriv returns x&y res
9e99759
1st Deriv serial pass all tests, GPU in progress
3a73fe0
Made kokkos 1st deriv test concise & automatable
d64a89e
Fixed difference calculation error
d424269
Known Error at parallel_for in 1stDeriv evaluation
793c6c0
Fixed formatting and argumnet check
b9db307
Changed 1st deriv to device function
ff2e5f7
Change x to vector of x, eval ok for cpu & gpu
93e722b
Update the input type for eval 1st derivative
b770910
Added 1spline constructor and accessors
6730696
Added multispline constructor
0d429d7
Coef calculation function in progress
e45dbba
Not test yet 1st pass implementation for coef calc
1d7fd21
Added new test for 2D view rep of Kokkos Spline
e25c9ef
For adding the library in CMakeLists.txt
e562b35
Syntax err fix for 2d kokkos spline test and class
2e44c75
Test updated, single spline initialization ok
716bd6c
add 1st pass eval1stDeriv, no compile err
9d07184
1st pass test, no compile & not in CMakeLists
156d619
Fixed 1st derivative coeff calculation
8d56882
Fixed 2nd deriv coeff calculation
036bbb3
1st deriv test pass both NATIVE & AMPERE86 builds
2089e1a
Add 1st & 2nd coef test pass ampere & native build
8f25efe
Fixed 1st & 2nd coef calculation
59d3ba6
First pass implementation for 2nd deriv
c7f583c
First pass implementation of 2nd deriv test
91e8c8f
Bug fixes, 2nd deriv test segfaults
54ec379
Fixed nested forloop, all serial ok, fail parallel
f2f91ce
Change deriv input to view, all test in cpu&gpu ok
72d0037
Attempt to format the functions
a25f24b
Update BSplineKokkos2D.h
hsiehhRPI 00a549b
Update testSplineKokkos2DBase.cpp
hsiehhRPI df86673
Update testKokkos2D1stDeriv.cpp
hsiehhRPI 6c5b232
Update testKokkos2D1stDeriv.cpp
hsiehhRPI ea33d98
Update testKokkos2D2ndDeriv.cpp
hsiehhRPI 0c9f9c6
Ran bash script and additional formatting fix
f09d1dd
Fix conflict & Merge branch 'fh_Kokkos_BSpline' of github.com:SCOREC/…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #include "BSplineKokkos.h" | ||
| #include <iostream> | ||
| /*template<typename ExecutionSpace> | ||
| BSplineKokkos<ExecutionSpace>::BSplineKokkos(int orderC, std::vector<double>& ctrlPtsC, std::vector<double>& knotsC, std::vector<double>& weightsC) { | ||
| order = orderC; | ||
| //Allocate appropriate view space based on the number of control points, copy the data over to view | ||
| ctrlPts("ctrlPts", ctrlPtsC.size()); | ||
| for (int i = 0; i < ctrlPtsC.size(); i++) { | ||
| ctrlPts(i) = ctrlPtsC[i]; | ||
| } | ||
| //Same for knots and weights | ||
| knots("knots", knotsC.size()); | ||
| for (int i = 0; i < knotsC.size(); i++) { | ||
| knots(i) = knotsC[i]; | ||
| } | ||
|
|
||
| weights("weights", weightsC.size()); | ||
| for (int i = 0; i < weightsC.size(); i++) { | ||
| weights(i) = weightsC[i]; | ||
| } | ||
| //Call the calculateDerivCoeff() to populate | ||
| //1st and 2nd deriavtive views | ||
|
|
||
| //NOTE: UNCOMMENT THIS ONCE ALL IN FRONT ARE RESOLVED | ||
| //calculateDerivCoeff(); | ||
|
|
||
| }*/ | ||
|
|
||
|
|
||
| /*template<typename ExecutionSpace> | ||
| void BSplineKokkos<ExecutionSpace>::calculateDerivCoeff() { | ||
| //Calculate first order derivative | ||
| //Allocate space for ctrlPts_1stD | ||
| ctrlPts_1stD("ctrlPts1Derivative", ctrlPts.extent(0)-1); | ||
| for (int i = 1; i < ctrlPts.extent(0); i++) { | ||
| double delta = double(order - 1)/(knots(i+order-1)-knots(i)); | ||
| ctrlPts_1stD(i) = ((ctrlPts(i) - ctrlPts(i-1)*delta)); | ||
|
|
||
| } | ||
|
|
||
| //Calculate second order derivative | ||
| //Allocate space for ctrlPts_2ndD | ||
| ctrlPts_2ndD("ctrlPts2Derivative", ctrlPts.extent(0)-2); | ||
| for (int i = 0; i < ctrlPts_1stD.extent(0); i++) { | ||
| double delta = double(order - 2) / (knots(i+order-1)-knots(i+1)); | ||
| ctrlPts_2ndD(i) = ((ctrlPts_1stD(i) - ctrlPts_1stD(i-1))*delta); | ||
| } | ||
| //TODO: find another way to verify the size of the second derivative view | ||
|
|
||
| }*/ | ||
|
|
||
| //Explicit instantiation of the templated class for Kokkos::serial | ||
| //template class BSplineKokkos<Kokkos::Serial>; | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove code that is commented out