Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
SPDL 0.0.10 documentation
SPDL 0.0.10 documentation
  • Home

Contents

  • Overview
  • Installation
  • Getting Started
    • Building and Running Pipeline
    • Pipeline Stages
    • Concurrency
  • Performance Analysis
    • Is data loading bottleneck?
    • Which stage is the bottleneck?
  • Usage Guide
    • Why try SPDL?
    • Paradigm Shift
    • Practical Example
  • Best Practices
  • Examples
    • image_dataloading
    • video_dataloading
    • imagenet_classification
    • multi_thread_preprocessing
  • Frequently Asked Questions

API References

  • API Reference
    • spdl.pipeline
    • spdl.dataloader
    • spdl.source
    • spdl.io
    • spdl.io.utils
  • API Reference (C++)
    • Class List
    • File List
    • API
      • Namespace spdl
      • Namespace spdl::core
      • Namespace std
      • Struct Buffer
      • Struct BytesAdaptor
      • Struct CPUBuffer
      • Struct DataInterface
      • Struct DecodeConfig
      • Struct DemuxConfig
      • Struct EncodeConfig
      • Template Struct Generator
      • Struct Generator::promise_type
      • Struct Rational
      • Struct RawPacketData
      • Struct SourceAdaptor
      • Struct Storage
      • Template Struct StreamingDecoder
      • Template Class Codec
      • Class CPUStorage
      • Template Class DemuxedPackets
      • Class Demuxer
      • Template Class FFmpegFrames
      • Class InternalError
      • Template Class StreamingDemuxer
      • Class TracingSession
      • Enum CodecID
      • Enum ElemClass
      • Enum MediaType
      • Function spdl::core::apply_bsf
      • Template Function spdl::core::clone(const FFmpegFrames<media_type>&)
      • Template Function spdl::core::clone(const DemuxedPackets<media_type>&)
      • Template Function spdl::core::convert_frames(const std::vector<const FFmpegFrames<media_type> *>&, std::shared_ptr<CPUStorage>)
      • Template Function spdl::core::convert_frames(const FFmpegFrames<media_type> *, std::shared_ptr<CPUStorage>)
      • Function spdl::core::cpu_buffer
      • Template Function spdl::core::decode_packets_ffmpeg
      • Function spdl::core::encode_image
      • Function spdl::core::extract_packets_at_indices
      • Function spdl::core::get_ffmpeg_filters
      • Function spdl::core::get_ffmpeg_log_level
      • Function spdl::core::get_ffmpeg_versions
      • Function spdl::core::init_glog
      • Function spdl::core::init_tracing
      • Template Function spdl::core::make_decoder
      • Function spdl::core::make_demuxer(const std::string&, const SourceAdaptorPtr&, const std::optional<DemuxConfig>&)
      • Function spdl::core::make_demuxer(const std::string_view, const std::optional<DemuxConfig>&)
      • Function spdl::core::register_avdevices
      • Function spdl::core::set_ffmpeg_log_level
      • Template Function spdl::core::trace_counter
      • Function spdl::core::trace_event_begin
      • Function spdl::core::trace_event_end
      • Define _IS_AUDIO
      • Define _IS_IMAGE
      • Define _IS_VIDEO
      • Define SPDL_DEFAULT_BUFFER_SIZE
      • Typedef spdl::core::AudioCodec
      • Typedef spdl::core::AudioPackets
      • Typedef spdl::core::AudioPacketsPtr
      • Typedef spdl::core::CPUBufferPtr
      • Typedef spdl::core::DecoderPtr
      • Typedef spdl::core::DemuxerPtr
      • Typedef spdl::core::FFmpegAudioFrames
      • Typedef spdl::core::FFmpegAudioFramesPtr
      • Typedef spdl::core::FFmpegFramesPtr
      • Typedef spdl::core::FFmpegImageFrames
      • Typedef spdl::core::FFmpegImageFramesPtr
      • Typedef spdl::core::FFmpegVideoFrames
      • Typedef spdl::core::FFmpegVideoFramesPtr
      • Typedef spdl::core::ImageCodec
      • Typedef spdl::core::ImagePackets
      • Typedef spdl::core::ImagePacketsPtr
      • Typedef spdl::core::OptionDict
      • Typedef spdl::core::PacketsPtr
      • Typedef spdl::core::SourceAdaptorPtr
      • Typedef spdl::core::StreamingDemuxerPtr
      • Typedef spdl::core::VideoCodec
      • Typedef spdl::core::VideoPackets
      • Typedef spdl::core::VideoPacketsPtr
  • API Index

Development Notes

  • Development Notes
    • Implementation detail of Pipeline
  • Versions
    • dev
    • latest-release
    • 0.0.9
    • 0.0.8
Back to top
View this page

spdl.io.to_numba¶

to_numba(buffer: CPUBuffer | CUDABuffer)[source]¶

Convert to Numba DeviceNDArray or NumPy NDArray.

Parameters:

buffer – Object implements the (CUDA) array interface protocol.

Returns:

A Numba DeviceNDArray or NumPy NDArray.

Return type:

(DeviceNDArray or NDArray)

See also

https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html

Copyright © 2025, Meta Platforms, Inc.
Made with Sphinx and @pradyunsg's Furo
On this page
  • spdl.io.to_numba
    • to_numba()