tls_scratch.h 529 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "range.h"
  3. namespace NYT {
  4. ////////////////////////////////////////////////////////////////////////////////
  5. //! Returns a temporary buffer (stored on TLS) of a given size.
  6. //! The content is initialized with default values of T before being returned.
  7. template <class T>
  8. TMutableRange<T> GetTlsScratchBuffer(size_t size);
  9. ////////////////////////////////////////////////////////////////////////////////
  10. } // namespace NYT
  11. #define TLS_SCRATH_INL_H_
  12. #include "tls_scratch-inl.h"
  13. #undef TLS_SCRATH_INL_H_