Skip to content
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

[PROJECT] Cleanup basic concepts & tests #1144

Closed
16 tasks done
DenisYaroshevskiy opened this issue Jan 9, 2022 · 2 comments
Closed
16 tasks done

[PROJECT] Cleanup basic concepts & tests #1144

DenisYaroshevskiy opened this issue Jan 9, 2022 · 2 comments
Labels
c++20 C++20 transition clean-up **HOT** This is an issue that needs work, like, now [PROJECT] Overarchign set of tasks

Comments

@DenisYaroshevskiy
Copy link
Collaborator

DenisYaroshevskiy commented Jan 9, 2022

We need a good clean up of basic concepts. And have tests for subsumption.

Phase 1

  • built_in_scalar_value (name is questionable - ints and floats)
  • arithmetic_scalar_value ( + product types)
  • predeclare wide <arithmetic_scalar_value>

Phase 2

  • arithmetic_simd_value = instance_of_wide
  • builtin_simd_value = arithmetic_simd_value && builtin_scalar_value<element_type>
  • predeclare logical<built_in_scalar_value>
  • predeclare logical<wide<built_in_scalar_value>>
  • logical_scalar_value = instance_of_logical && the T inside is built_in_scalar_value
  • logical_simd_value = instance_of_logical && the T inside is built_in_simd_value

Phase 3

Updated plan

By trying to remove the complicated and rather redundant common_compatible and common_compatible_value, @jtlap found out we can get rid of them with a simpler traits and couple of concepts. THe experience seems safer and more controlalble than just doing s/real//.

  • Use a single common_value traits
  • real_* is in fact just requiring < to exist, adapt to make it obvious
  • Remove all real_*
  • Remove all real_*_value concepts as they are useless
  • scalar_value = arithmetic_scalar_value || logical_scalar_value
  • simd_value = arithmetic_simd_value || logical_simd_value
  • value = scalar_value || simd_value
@DenisYaroshevskiy DenisYaroshevskiy added the feature New feature or request label Jan 9, 2022
@jfalcou jfalcou changed the title [FEATURE] basic concepts clean up/tests [PROJECT] Cleanup basic concepts & tests Jan 23, 2022
@jfalcou jfalcou added **HOT** This is an issue that needs work, like, now c++20 C++20 transition clean-up and removed feature New feature or request labels Jan 23, 2022
@jfalcou jfalcou pinned this issue Jan 23, 2022
@jfalcou jfalcou added the [PROJECT] Overarchign set of tasks label Jan 23, 2022
@jfalcou
Copy link
Owner

jfalcou commented Apr 5, 2022

Note for later: we need to have product_type types somewhere so we can ask for SIMD product types proper.
This is a use case for complex for ex.

DenisYaroshevskiy pushed a commit that referenced this issue Jun 2, 2022
* Implement builtin_vectorizable/vectorizable new concepts

* Make wide accept vectorizable type

* Make vectorizable works on nested product_type

* Adapt unit test becasue MSVC has 8 bytes long double

* Don't generate logical<bool>

* Renamed concept to plain_scalar/scalar

* Better plain_scalar

* Remove remaining char

* Some more char

* More char

* Split scalar produc_type concept for later reuse

* MSVC is at it again

* Final renaming
jfalcou added a commit that referenced this issue Jun 5, 2022
+ Added simd related concept
+ Renamed scalar concepts to be more homogeneous
+ Constrainted logical
jfalcou pushed a commit that referenced this issue Dec 1, 2022
jfalcou pushed a commit that referenced this issue Dec 4, 2022
* polynomial

* combinatorial

* special1

* special

* some remaining common_compatible

* logicalandnot + jacobi

* reverse_horner

* joel's remarks
jfalcou pushed a commit that referenced this issue Dec 9, 2022
DenisYaroshevskiy pushed a commit that referenced this issue Dec 11, 2022
* Rewrite scalar_value and simd_value properly

* Fix arithmetic concepts usage

* Fix test using char

* Fix code thinking bool is a scalar_value

* Fix requirement on wide constructor from scalar

* Use one and 1 in pow so complex works

* Extend plain_scalar_value support

A lot of internal code use non csdtint type and it would have been to
complicated to change all of them. Also, the added types are commonly
used by users they warrant to be taken into account.

* Fix as_value

* More pow fixes

* Fix if_else test to not use raw bool

* Better match for converting wide ctor

* Rogue bool in examples

* More fixes after tests have been run

* Fix rogue long double in random tests

* Doc typo

* As per Slack discussion, we'll re-fix plain_scalar_value later

* Simplify scalar_* and simd_* concepts
@jfalcou
Copy link
Owner

jfalcou commented Dec 11, 2022

Merged in 40e4615

@jfalcou jfalcou closed this as completed Dec 11, 2022
@jfalcou jfalcou unpinned this issue Dec 11, 2022
jtlap pushed a commit that referenced this issue May 12, 2024
* Implement builtin_vectorizable/vectorizable new concepts

* Make wide accept vectorizable type

* Make vectorizable works on nested product_type

* Adapt unit test becasue MSVC has 8 bytes long double

* Don't generate logical<bool>

* Renamed concept to plain_scalar/scalar

* Better plain_scalar

* Remove remaining char

* Some more char

* More char

* Split scalar produc_type concept for later reuse

* MSVC is at it again

* Final renaming
jtlap pushed a commit that referenced this issue May 12, 2024
+ Added simd related concept
+ Renamed scalar concepts to be more homogeneous
+ Constrainted logical
jtlap added a commit that referenced this issue May 12, 2024
* polynomial

* combinatorial

* special1

* special

* some remaining common_compatible

* logicalandnot + jacobi

* reverse_horner

* joel's remarks
jtlap added a commit that referenced this issue May 12, 2024
jtlap pushed a commit that referenced this issue May 12, 2024
* Rewrite scalar_value and simd_value properly

* Fix arithmetic concepts usage

* Fix test using char

* Fix code thinking bool is a scalar_value

* Fix requirement on wide constructor from scalar

* Use one and 1 in pow so complex works

* Extend plain_scalar_value support

A lot of internal code use non csdtint type and it would have been to
complicated to change all of them. Also, the added types are commonly
used by users they warrant to be taken into account.

* Fix as_value

* More pow fixes

* Fix if_else test to not use raw bool

* Better match for converting wide ctor

* Rogue bool in examples

* More fixes after tests have been run

* Fix rogue long double in random tests

* Doc typo

* As per Slack discussion, we'll re-fix plain_scalar_value later

* Simplify scalar_* and simd_* concepts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++20 C++20 transition clean-up **HOT** This is an issue that needs work, like, now [PROJECT] Overarchign set of tasks
Projects
None yet
Development

No branches or pull requests

2 participants