You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2021/01/19 21:18:21 UTC

[GitHub] [datasketches-cpp] AlexanderSaydakov opened a new pull request #183: support allocator instance

AlexanderSaydakov opened a new pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] AlexanderSaydakov commented on a change in pull request #183: support allocator instance

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov commented on a change in pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183#discussion_r564146654



##########
File path: cpc/include/cpc_sketch_impl.hpp
##########
@@ -401,7 +406,7 @@ string<A> cpc_sketch_alloc<A>::to_string() const {
 
 template<typename A>
 void cpc_sketch_alloc<A>::serialize(std::ostream& os) const {
-  compressed_state<A> compressed;
+  compressed_state<A> compressed(A(sliding_window.get_allocator()));

Review comment:
       We are using a provided allocator for all allocations within an instance, including temporary allocations. I think this is good enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] jmalkin commented on a change in pull request #183: support allocator instance

Posted by GitBox <gi...@apache.org>.
jmalkin commented on a change in pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183#discussion_r563538631



##########
File path: cpc/include/cpc_sketch_impl.hpp
##########
@@ -401,7 +406,7 @@ string<A> cpc_sketch_alloc<A>::to_string() const {
 
 template<typename A>
 void cpc_sketch_alloc<A>::serialize(std::ostream& os) const {
-  compressed_state<A> compressed;
+  compressed_state<A> compressed(A(sliding_window.get_allocator()));

Review comment:
       Should serialize() have the option of using a different allocator? It's not entirely obvious that, say, a limited-size allocator would want transient things like serialization to complete for space with the main stored data?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] AlexanderSaydakov commented on a change in pull request #183: support allocator instance

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov commented on a change in pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183#discussion_r564146654



##########
File path: cpc/include/cpc_sketch_impl.hpp
##########
@@ -401,7 +406,7 @@ string<A> cpc_sketch_alloc<A>::to_string() const {
 
 template<typename A>
 void cpc_sketch_alloc<A>::serialize(std::ostream& os) const {
-  compressed_state<A> compressed;
+  compressed_state<A> compressed(A(sliding_window.get_allocator()));

Review comment:
       We are using a provided allocator for all allocations within an instance, including temporary allocations. I think this is good enough.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] jmalkin commented on a change in pull request #183: support allocator instance

Posted by GitBox <gi...@apache.org>.
jmalkin commented on a change in pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183#discussion_r563538631



##########
File path: cpc/include/cpc_sketch_impl.hpp
##########
@@ -401,7 +406,7 @@ string<A> cpc_sketch_alloc<A>::to_string() const {
 
 template<typename A>
 void cpc_sketch_alloc<A>::serialize(std::ostream& os) const {
-  compressed_state<A> compressed;
+  compressed_state<A> compressed(A(sliding_window.get_allocator()));

Review comment:
       Should serialize() have the option of using a different allocator? It's not entirely obvious that, say, a limited-size allocator would want transient things like serialization to complete for space with the main stored data?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org


[GitHub] [datasketches-cpp] AlexanderSaydakov merged pull request #183: support allocator instance

Posted by GitBox <gi...@apache.org>.
AlexanderSaydakov merged pull request #183:
URL: https://github.com/apache/datasketches-cpp/pull/183


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org