-
Notifications
You must be signed in to change notification settings - Fork 10
SIMD unittests [WIP] #29
base: master
Are you sure you want to change the base?
Conversation
8f17c6f
to
f1b9670
Compare
f1b9670
to
1c7eda9
Compare
Refactored a little bit.
Done only all basics methods.
Unit tests need to work on:
|
test/TestMath.cpp
Outdated
|
||
// Methods to create data | ||
template<class ValueType> | ||
Kokkos::View<simd_t<ValueType> *> create_data_with_uniq_value(std::string name, int size, ValueType value) { |
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.
I would change a bit the names here to be more explicit about what we are creating, something like:
create_view_with_unique_value
test/TestMath.cpp
Outdated
} | ||
|
||
template<class ValueType> | ||
Kokkos::View<simd_t<ValueType> *> create_data_zero_to_size_positive(std::string name, int size, SIMD_CONSTRUCTOR constructor = SIMD_CONSTRUCTOR_SCALAR) { |
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.
improve name because If I read this, I would not get what "positive" means
test/TestMath.cpp
Outdated
} | ||
|
||
template<class ValueType> | ||
Kokkos::View<simd_t<ValueType> *> create_data_zero_to_size_negative(std::string name, int size, SIMD_CONSTRUCTOR constructor = SIMD_CONSTRUCTOR_SCALAR) { |
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.
similarly to positive
test/TestMath.cpp
Outdated
} | ||
|
||
template<class ValueType> | ||
Kokkos::View<simd_t<ValueType> *> create_data_sqrt(std::string name, int size, SIMD_CONSTRUCTOR constructor = SIMD_CONSTRUCTOR_SCALAR) { |
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.
"create_data_sqrt" what does this mean? if this a helper function needed to test the sqrt, then we could use:
create_view_for_sqrt_test
otherwise, if we chose a more general name, the name should express how you fill it
test/TestMath.cpp
Outdated
} | ||
|
||
template<class ValueType> | ||
Kokkos::View<simd_t<ValueType> *> create_data_cbrt(std::string name, int size, SIMD_CONSTRUCTOR constructor = SIMD_CONSTRUCTOR_SCALAR) { |
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.
same comment as the sqrt
Related to NexGenAnalytics#1
TODO: