Documentation ¶
Overview ¶
Package readers provides implementation for common reader types
- Copyright (c) 2018-2024, NVIDIA CORPORATION. All rights reserved.
Package readers provides implementation for common reader types
- Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- type Params
- type Reader
- func New(p Params, cksumType string) (Reader, error)
- func NewBytes(buf []byte) Reader
- func NewExistingFile(fn, cksumType string) (Reader, error)
- func NewRand(size int64, cksumType string) (Reader, error)
- func NewRandFile(filepath, name string, size int64, cksumType string) (Reader, error)
- func NewSG(sgl *memsys.SGL, size int64, cksumType string) (Reader, error)
Constants ¶
View Source
const ( // TypeFile defines the name for file reader TypeFile = "file" // TypeSG defines the name for sg reader TypeSG = "sg" // TypeRand defines the name for rand reader TypeRand = "rand" // TypeTar defines the name for random TAR reader TypeTar = "tar" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶ added in v1.3.19
type Params struct { Type string // file | sg | inmem | rand SGL *memsys.SGL // When Type == sg Path, Name string // When Type == file; path and name of file to be created (if not already existing) Size int64 }
(aisloader only)
type Reader ¶
func NewExistingFile ¶ added in v1.3.19
NewExistingFile opens an existing file, reads it to compute checksum, and returns a new reader. NOTE: Caller responsible for closing.
func NewRandFile ¶ added in v1.3.19
creates/opens the file, populates it with random data, and returns a new fileReader NOTE: Caller is responsible for closing.
Click to show internal directories.
Click to hide internal directories.