#include "tensorstore/spec.h"
class tensorstore::Spec;

Specifies the parameters necessary to open or create a TensorStore.

Includes the driver identifier, driver parameters, optionally an IndexTransform and Schema.

Constructors

Spec();

Constructs an invalid specification.

Methods

bool valid() const;

Returns true if this is a valid spec.

DataType dtype() const;

Returns the data type.

DimensionIndex rank() const;

Returns the rank of the TensorStore, or dynamic_rank if unknown.

Result<Schema> schema() const;

Returns the effective schema, which includes all known information, propagated to the transformed space.

Result<IndexDomain<>> domain() const;

Returns the effective domain, based on the schema constraints as well as any driver-specific constraints. If the domain cannot be determined, returns a null index domain.

Result<ChunkLayout> chunk_layout() const;

Returns the effective chunk layout, which includes all known information, propagated to the transformed space.

Result<CodecSpec> codec() const;

Returns the effective codec, propagated to the transformed space.

Result<SharedArray<const void>> fill_value() const;

Returns the effective fill value, propagated to the transformed space.

Result<DimensionUnitsVector> dimension_units() const;

Returns the effective dimension units, propagated to the transformed space.

kvstore::Spec kvstore() const;

Returns the associated key-value store used as the underlying storage. If unspecified or not applicable, returns a null (invalid) spec.

const IndexTransform<>transform() const;

Returns the transform applied on top of the driver.

Result<Spec> base() const;

Returns the underlying Spec, if this is an adapter.

OpenMode open_mode() const;

Returns the mode with which the driver will be opened.

absl::Status Set(Option&&... option);
absl::Status Set(SpecConvertOptions&options);

Applies the specified options in place.

absl::Status BindContext(const Contextcontext);

Binds any unbound context resources using the specified context. Any already-bound context resources remain unmodified.

void UnbindContext();

Unbinds any bound context resources, replacing them with context resource specs that may be used to recreate the context resources. Any already-unbound context resources remain unmodified.

void StripContext();

Replaces any context resources with a default context resource spec.

ContextBindingState context_binding_state() const;

Indicates the context binding state of the spec.

Result<IndexTransform<>> GetTransformForIndexingOperation() const;

Returns a transform that may be used for apply a DimExpression.

Friend functions

friend auto ApplyIndexTransform(Expr&exprSpec spec);

Applies a function that operates on an IndexTransform to a Spec.

friend Result<Spec>
ApplyIndexTransform(IndexTransform<> transformSpec spec);

Applies an index transform to a Spec.

friend bool operator==(const Specaconst Specb);
friend bool operator!=(const Specaconst Specb);

Compares for equality via JSON representation, except that bound context resources are compared by identity.

enum class tensorstore::OpenMode;

Specifies the mode to use when opening a TensorStore.

class tensorstore::MinimalSpec;

Indicates a minimal spec, i.e. missing information necessary to recreate.

struct tensorstore::RecheckCacheOption;

Specifies time bound on cached data that may be used without revalidation.

struct tensorstore::RecheckCachedData : public RecheckCacheOption;

Specifies time bound on cached array data (as opposed to metadata).

struct tensorstore::RecheckCachedMetadata : public RecheckCacheOption;

Specifies time bound on cached metadata (as opposed to actual array data).

struct tensorstore::RecheckCached : public RecheckCacheOption;

Specifies the same time bound for both cached array data and metadata.

struct tensorstore::SpecOptions : public Schema;

Options for mutating Spec objects.

struct tensorstore::SpecRequestOptions : public SpecOptions;

Options for requesting a Spec from an open TensorStore.

struct tensorstore::SpecConvertOptions : public SpecRequestOptions;

Options for converting an existing Spec.

struct tensorstore::OpenOptions : public SpecOptions;

Options for opening a Spec.

struct tensorstore::TransactionalOpenOptions : public OpenOptions;

Options for opening a Spec with optional transaction and optional batch.

Result<Spec>
tensorstore::Cast(const Specbase_specDataType target_dtype);

Returns a view of a Spec with a converted data type.