Template Function Pennylane::Util::chunkDataSize

Function Documentation

template<template<typename...> class Container, typename T>
auto Pennylane::Util::chunkDataSize(const Container<T> &data, std::size_t chunk_size) -> Container<Container<T>>

Chunk the data using the requested chunk size.

Template Parameters
  • Container – STL container type

  • T – Data-type of STL container

Parameters
  • data – Data to chunk

  • chunk_size – Chunk size to use.

Returns

Container<Container<T>> Container of {Containers of data with sizes chunk_size}