diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-16 03:49:08 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-16 03:49:08 +0000 |
commit | d907c6fe647877d70da4d0da60a9d484bb36560f (patch) | |
tree | 34431733b7b8247e83ebb41bf6351f14d356bfd1 /sca-cpp/trunk/kernel/list.hpp | |
parent | c3cc3ea6b1ea3472899bd467230fffd82d1889aa (diff) |
Add a partitioner component, which combined with a selector component can be used to implement data partitioning, sharding, or data access load balancing for example.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1231822 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/kernel/list.hpp | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/sca-cpp/trunk/kernel/list.hpp b/sca-cpp/trunk/kernel/list.hpp index df7bc27c03..60dcbb083a 100644 --- a/sca-cpp/trunk/kernel/list.hpp +++ b/sca-cpp/trunk/kernel/list.hpp @@ -362,20 +362,48 @@ template<typename T> const T cadddddddr(const list<T>& p) { } /** - * Returns the cdr of a cdr of a list. + * Returns a list of elements from the 3rd to the end of a list. */ template<typename T> const list<T> cddr(const list<T>& p) { return cdr(cdr(p)); } /** - * Returns the cdr of a cdr of the cdr of a list. + * Returns a list of elements from the 4th to the end of a list. */ template<typename T> const list<T> cdddr(const list<T>& p) { return cdr(cdr(cdr(p))); } /** + * Returns a list of elements from the 5th to the end of a list. + */ +template<typename T> const list<T> cddddr(const list<T>& p) { + return cdr(cdr(cdr(cdr(p)))); +} + +/** + * Returns a list of elements from the 6th to the end of a list. + */ +template<typename T> const list<T> cdddddr(const list<T>& p) { + return cdr(cdr(cdr(cdr(cdr(p))))); +} + +/** + * Returns a list of elements from the 7th to the end of a list. + */ +template<typename T> const list<T> cddddddr(const list<T>& p) { + return cdr(cdr(cdr(cdr(cdr(cdr(p)))))); +} + +/** + * Returns a list of elements from the 8th to the end of a list. + */ +template<typename T> const list<T> cdddddddr(const list<T>& p) { + return cdr(cdr(cdr(cdr(cdr(cdr(cdr(p))))))); +} + +/** * Returns the length of a list. */ template<typename T> struct lengthRef { |