Skip to content

Commit

Permalink
Debugging Ray comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemoret-nv committed Oct 6, 2024
1 parent 5297c0f commit 99d9df2
Show file tree
Hide file tree
Showing 8 changed files with 519 additions and 7 deletions.
5 changes: 4 additions & 1 deletion cpp/mrc/include/mrc/codable/fundamental_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "mrc/codable/encode.hpp"
#include "mrc/codable/encoding_options.hpp"
#include "mrc/codable/types.hpp"
#include "mrc/memory/literals.hpp"
#include "mrc/memory/memory_kind.hpp"
#include "mrc/utils/tuple_utils.hpp"

Expand Down Expand Up @@ -157,14 +158,16 @@ struct codable_protocol<std::vector<T>>
mrc::codable::Encoder2<std::vector<T>>& encoder,
const mrc::codable::EncodingOptions& opts)
{
using namespace mrc::memory::literals;

// First put in the size
mrc::codable::encode2(obj.size(), encoder, opts);

if constexpr (std::is_fundamental_v<T>)
{
// Since these are fundamental types, just encode in a single memory block
encoder.write_descriptor({obj.data(), obj.size() * sizeof(T), memory::memory_kind::host},
DescriptorKind::Deferred);
obj.size() * sizeof(T) > 1_MiB ? DescriptorKind::Eager : DescriptorKind::Deferred);
}
else
{
Expand Down
Loading

0 comments on commit 99d9df2

Please sign in to comment.