Skip to main content

ApplyExtendedResourcesOverrides

Applies overrides to a base core.ExtendedResources object, merging fields individually rather than performing a nested merge. It handles cases where the base object might be nil and applies overrides for GPU accelerators and shared memory if present.

def ApplyExtendedResourcesOverrides(
base: *core.ExtendedResources,
overrides: *core.ExtendedResources
) - > *core.ExtendedResources

Applies specialized merging of overrides into a base core.ExtendedResources object. This function handles each field separately to ensure intended behavior, rather than a nested merge.

Parameters

NameTypeDescription
base*core.ExtendedResourcesThe base core.ExtendedResources object to which overrides will be applied. If nil, a new empty core.ExtendedResources object is created.
overrides*core.ExtendedResourcesThe core.ExtendedResources object containing the override values. If nil, no overrides are applied.

Returns

TypeDescription
*core.ExtendedResourcesA new core.ExtendedResources object with overrides applied. If the base is nil, a new empty object is returned. If no overrides are provided, a clone of the base object is returned.