[GitHub] trafficserver pull request #1381: Lib Scalar

2017-03-10 Thread SolidWallOfCode
Github user SolidWallOfCode closed the pull request at:

https://github.com/apache/trafficserver/pull/1381


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1381: Lib Scalar

2017-01-26 Thread SolidWallOfCode
GitHub user SolidWallOfCode opened a pull request:

https://github.com/apache/trafficserver/pull/1381

Lib Scalar

Scalar is a header only library. It provides typed numeric values that have 
a scaling factor. The "value" of a scalar is its count multiplied by its scale. 
The primary benefits are

* The scaling factor is explicit and carried with the type.
* Conversions between scaled values are automatic or rejected by the 
compiler.
* Explicit conversions indicate rounding up or down.
* Conversions are as fast as possible, compiling down to single multiplies 
or divides if one scale is a multiple of the other. If the scales are powers of 
two the conversions are compiled down to shift operations.

This is currently being tested in work on the cache, using Scalar to 
represent the various size values in the cache. This provides simple 
conversions and compiler warnings when scales don't match.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/SolidWallOfCode/trafficserver lib-scalar

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1381.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1381


commit 2e178814bb559362ff6f4955f2133809f0fe08cd
Author: Alan M. Carroll 
Date:   2016-12-29T21:39:21Z

Scalar: Add Scalar (scaled value) support class.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---