mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-03-31 19:58:45 +08:00
Merge pull request #74433 from tallclair/runtimeclass-internal
Migrate RuntimeClass from a CRD to an internal API Kubernetes-commit: 183e6cc1902c2088a40e60cf4138bd829d4ad80f
This commit is contained in:
parent
4827b21b91
commit
5833ea29bd
534
Godeps/Godeps.json
generated
534
Godeps/Godeps.json
generated
File diff suppressed because it is too large
Load Diff
1
vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=admissionregistration.k8s.io
|
||||
|
||||
|
1
vendor/k8s.io/api/apps/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/apps/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1
|
||||
|
1
vendor/k8s.io/api/apps/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/apps/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1beta1
|
||||
|
1
vendor/k8s.io/api/apps/v1beta2/doc.go
generated
vendored
1
vendor/k8s.io/api/apps/v1beta2/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1beta2
|
||||
|
1
vendor/k8s.io/api/auditregistration/v1alpha1/doc.go
generated
vendored
1
vendor/k8s.io/api/auditregistration/v1alpha1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=auditregistration.k8s.io
|
||||
|
1
vendor/k8s.io/api/authentication/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/authentication/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +groupName=authentication.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
|
1
vendor/k8s.io/api/authentication/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/authentication/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +groupName=authentication.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
|
1
vendor/k8s.io/api/authorization/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/authorization/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=authorization.k8s.io
|
||||
|
1
vendor/k8s.io/api/authorization/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/authorization/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=authorization.k8s.io
|
||||
|
1
vendor/k8s.io/api/autoscaling/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/autoscaling/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1
|
||||
|
1
vendor/k8s.io/api/autoscaling/v2beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/autoscaling/v2beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v2beta1
|
||||
|
1
vendor/k8s.io/api/autoscaling/v2beta2/doc.go
generated
vendored
1
vendor/k8s.io/api/autoscaling/v2beta2/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v2beta2
|
||||
|
1
vendor/k8s.io/api/batch/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/batch/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1
|
||||
|
1
vendor/k8s.io/api/batch/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/batch/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1beta1
|
||||
|
1
vendor/k8s.io/api/batch/v2alpha1/doc.go
generated
vendored
1
vendor/k8s.io/api/batch/v2alpha1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v2alpha1
|
||||
|
1
vendor/k8s.io/api/certificates/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/certificates/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=certificates.k8s.io
|
||||
|
1
vendor/k8s.io/api/coordination/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/coordination/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=coordination.k8s.io
|
||||
|
1
vendor/k8s.io/api/coordination/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/coordination/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=coordination.k8s.io
|
||||
|
6
vendor/k8s.io/api/core/v1/annotation_key_constants.go
generated
vendored
6
vendor/k8s.io/api/core/v1/annotation_key_constants.go
generated
vendored
@ -97,4 +97,10 @@ const (
|
||||
// This annotation will be used to compute the in-cluster network programming latency SLI, see
|
||||
// https://github.com/kubernetes/community/blob/master/sig-scalability/slos/network_programming_latency.md
|
||||
EndpointsLastChangeTriggerTime = "endpoints.kubernetes.io/last-change-trigger-time"
|
||||
|
||||
// MigratedPluginsAnnotationKey is the annotation key, set for CSINode objects, that is a comma-separated
|
||||
// list of in-tree plugins that will be serviced by the CSI backend on the Node represented by CSINode.
|
||||
// This annotation is used by the Attach Detach Controller to determine whether to use the in-tree or
|
||||
// CSI Backend for a volume plugin on a specific node.
|
||||
MigratedPluginsAnnotationKey = "storage.alpha.kubernetes.io/migrated-plugins"
|
||||
)
|
||||
|
1
vendor/k8s.io/api/core/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/core/v1/doc.go
generated
vendored
@ -16,6 +16,7 @@ limitations under the License.
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
|
||||
// Package v1 is the v1 version of the core API.
|
||||
package v1
|
||||
|
1
vendor/k8s.io/api/events/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/events/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=events.k8s.io
|
||||
|
1
vendor/k8s.io/api/extensions/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/extensions/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
package v1beta1
|
||||
|
1
vendor/k8s.io/api/networking/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/networking/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=networking.k8s.io
|
||||
|
||||
|
1
vendor/k8s.io/api/networking/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/networking/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
// +groupName=networking.k8s.io
|
||||
|
||||
|
22
vendor/k8s.io/api/node/v1alpha1/doc.go
generated
vendored
Normal file
22
vendor/k8s.io/api/node/v1alpha1/doc.go
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=node.k8s.io
|
||||
|
||||
package v1alpha1
|
696
vendor/k8s.io/api/node/v1alpha1/generated.pb.go
generated
vendored
Normal file
696
vendor/k8s.io/api/node/v1alpha1/generated.pb.go
generated
vendored
Normal file
@ -0,0 +1,696 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto
|
||||
|
||||
/*
|
||||
Package v1alpha1 is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
RuntimeClass
|
||||
RuntimeClassList
|
||||
RuntimeClassSpec
|
||||
*/
|
||||
package v1alpha1
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
import io "io"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
func (m *RuntimeClass) Reset() { *m = RuntimeClass{} }
|
||||
func (*RuntimeClass) ProtoMessage() {}
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} }
|
||||
func (*RuntimeClassList) ProtoMessage() {}
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
|
||||
func (m *RuntimeClassSpec) Reset() { *m = RuntimeClassSpec{} }
|
||||
func (*RuntimeClassSpec) ProtoMessage() {}
|
||||
func (*RuntimeClassSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{2} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1alpha1.RuntimeClass")
|
||||
proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassList")
|
||||
proto.RegisterType((*RuntimeClassSpec)(nil), "k8s.io.api.node.v1alpha1.RuntimeClassSpec")
|
||||
}
|
||||
func (m *RuntimeClass) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
|
||||
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size()))
|
||||
n2, err := m.Spec.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n2
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
|
||||
n3, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n3
|
||||
if len(m.Items) > 0 {
|
||||
for _, msg := range m.Items {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
|
||||
n, err := msg.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassSpec) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassSpec) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(len(m.RuntimeHandler)))
|
||||
i += copy(dAtA[i:], m.RuntimeHandler)
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *RuntimeClass) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ObjectMeta.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
l = m.Spec.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ListMeta.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
if len(m.Items) > 0 {
|
||||
for _, e := range m.Items {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *RuntimeClassSpec) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.RuntimeHandler)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func sovGenerated(x uint64) (n int) {
|
||||
for {
|
||||
n++
|
||||
x >>= 7
|
||||
if x == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
func sozGenerated(x uint64) (n int) {
|
||||
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *RuntimeClass) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&RuntimeClass{`,
|
||||
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RuntimeClassSpec", "RuntimeClassSpec", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *RuntimeClassList) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&RuntimeClassList{`,
|
||||
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RuntimeClass", "RuntimeClass", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *RuntimeClassSpec) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&RuntimeClassSpec{`,
|
||||
`RuntimeHandler:` + fmt.Sprintf("%v", this.RuntimeHandler) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringGenerated(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *RuntimeClass) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: RuntimeClass: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: RuntimeClass: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *RuntimeClassList) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: RuntimeClassList: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: RuntimeClassList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Items = append(m.Items, RuntimeClass{})
|
||||
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *RuntimeClassSpec) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: RuntimeClassSpec: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: RuntimeClassSpec: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field RuntimeHandler", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.RuntimeHandler = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipGenerated(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
return iNdEx, nil
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
iNdEx += length
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthGenerated
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 3:
|
||||
for {
|
||||
var innerWire uint64
|
||||
var start int = iNdEx
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
innerWire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
innerWireType := int(innerWire & 0x7)
|
||||
if innerWireType == 4 {
|
||||
break
|
||||
}
|
||||
next, err := skipGenerated(dAtA[start:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
iNdEx = start + next
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 4:
|
||||
return iNdEx, nil
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
return iNdEx, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1alpha1/generated.proto", fileDescriptorGenerated)
|
||||
}
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 421 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x6b, 0xd4, 0x40,
|
||||
0x14, 0xc7, 0x33, 0xb5, 0x85, 0x75, 0x5a, 0x4b, 0xc9, 0x41, 0xc2, 0x1e, 0xa6, 0x65, 0x0f, 0x52,
|
||||
0x04, 0x67, 0xdc, 0x22, 0xe2, 0x49, 0x30, 0x5e, 0x14, 0x2b, 0x42, 0xbc, 0x89, 0x07, 0x27, 0xc9,
|
||||
0x33, 0x19, 0xb3, 0xc9, 0x0c, 0x99, 0x49, 0xc0, 0x9b, 0x1f, 0xc1, 0x2f, 0xa4, 0xe7, 0x3d, 0xf6,
|
||||
0xd8, 0x53, 0x71, 0xe3, 0x17, 0x91, 0x99, 0x64, 0xbb, 0xdb, 0x2e, 0xc5, 0xbd, 0xe5, 0xbd, 0xf9,
|
||||
0xff, 0x7f, 0xef, 0xfd, 0x5f, 0xf0, 0xab, 0xe2, 0x85, 0xa6, 0x42, 0xb2, 0xa2, 0x89, 0xa1, 0xae,
|
||||
0xc0, 0x80, 0x66, 0x2d, 0x54, 0xa9, 0xac, 0xd9, 0xf0, 0xc0, 0x95, 0x60, 0x95, 0x4c, 0x81, 0xb5,
|
||||
0x53, 0x3e, 0x53, 0x39, 0x9f, 0xb2, 0x0c, 0x2a, 0xa8, 0xb9, 0x81, 0x94, 0xaa, 0x5a, 0x1a, 0xe9,
|
||||
0x07, 0xbd, 0x92, 0x72, 0x25, 0xa8, 0x55, 0xd2, 0xa5, 0x72, 0xfc, 0x24, 0x13, 0x26, 0x6f, 0x62,
|
||||
0x9a, 0xc8, 0x92, 0x65, 0x32, 0x93, 0xcc, 0x19, 0xe2, 0xe6, 0xab, 0xab, 0x5c, 0xe1, 0xbe, 0x7a,
|
||||
0xd0, 0xf8, 0xd9, 0x6a, 0x64, 0xc9, 0x93, 0x5c, 0x54, 0x50, 0x7f, 0x67, 0xaa, 0xc8, 0x6c, 0x43,
|
||||
0xb3, 0x12, 0x0c, 0x67, 0xed, 0xc6, 0xf8, 0x31, 0xbb, 0xcb, 0x55, 0x37, 0x95, 0x11, 0x25, 0x6c,
|
||||
0x18, 0x9e, 0xff, 0xcf, 0xa0, 0x93, 0x1c, 0x4a, 0x7e, 0xdb, 0x37, 0xf9, 0x8d, 0xf0, 0x41, 0xd4,
|
||||
0x4b, 0x5e, 0xcf, 0xb8, 0xd6, 0xfe, 0x17, 0x3c, 0xb2, 0x4b, 0xa5, 0xdc, 0xf0, 0x00, 0x9d, 0xa0,
|
||||
0xd3, 0xfd, 0xb3, 0xa7, 0x74, 0x75, 0x8b, 0x6b, 0x36, 0x55, 0x45, 0x66, 0x1b, 0x9a, 0x5a, 0x35,
|
||||
0x6d, 0xa7, 0xf4, 0x43, 0xfc, 0x0d, 0x12, 0xf3, 0x1e, 0x0c, 0x0f, 0xfd, 0xf9, 0xd5, 0xb1, 0xd7,
|
||||
0x5d, 0x1d, 0xe3, 0x55, 0x2f, 0xba, 0xa6, 0xfa, 0xe7, 0x78, 0x57, 0x2b, 0x48, 0x82, 0x1d, 0x47,
|
||||
0x7f, 0x4c, 0xef, 0xba, 0x34, 0x5d, 0xdf, 0xeb, 0xa3, 0x82, 0x24, 0x3c, 0x18, 0xb8, 0xbb, 0xb6,
|
||||
0x8a, 0x1c, 0x65, 0xf2, 0x0b, 0xe1, 0xa3, 0x75, 0xe1, 0xb9, 0xd0, 0xc6, 0xff, 0xbc, 0x11, 0x82,
|
||||
0x6e, 0x17, 0xc2, 0xba, 0x5d, 0x84, 0xa3, 0x61, 0xd4, 0x68, 0xd9, 0x59, 0x0b, 0xf0, 0x0e, 0xef,
|
||||
0x09, 0x03, 0xa5, 0x0e, 0x76, 0x4e, 0xee, 0x9d, 0xee, 0x9f, 0x3d, 0xda, 0x2e, 0x41, 0xf8, 0x60,
|
||||
0x40, 0xee, 0xbd, 0xb5, 0xe6, 0xa8, 0x67, 0x4c, 0xa2, 0x9b, 0xeb, 0xdb, 0x64, 0xfe, 0x4b, 0x7c,
|
||||
0x38, 0xfc, 0xb6, 0x37, 0xbc, 0x4a, 0x67, 0x50, 0xbb, 0x10, 0xf7, 0xc3, 0x87, 0x03, 0xe1, 0x30,
|
||||
0xba, 0xf1, 0x1a, 0xdd, 0x52, 0x87, 0x74, 0xbe, 0x20, 0xde, 0xc5, 0x82, 0x78, 0x97, 0x0b, 0xe2,
|
||||
0xfd, 0xe8, 0x08, 0x9a, 0x77, 0x04, 0x5d, 0x74, 0x04, 0x5d, 0x76, 0x04, 0xfd, 0xe9, 0x08, 0xfa,
|
||||
0xf9, 0x97, 0x78, 0x9f, 0x46, 0xcb, 0x35, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x94, 0x34, 0x0e,
|
||||
0xef, 0x30, 0x03, 0x00, 0x00,
|
||||
}
|
76
vendor/k8s.io/api/node/v1alpha1/generated.proto
generated
vendored
Normal file
76
vendor/k8s.io/api/node/v1alpha1/generated.proto
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.node.v1alpha1;
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1alpha1";
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is
|
||||
// responsible for resolving the RuntimeClassName reference before running the
|
||||
// pod. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
|
||||
message RuntimeClass {
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Specification of the RuntimeClass
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
optional RuntimeClassSpec spec = 2;
|
||||
}
|
||||
|
||||
// RuntimeClassList is a list of RuntimeClass objects.
|
||||
message RuntimeClassList {
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of schema objects.
|
||||
repeated RuntimeClass items = 2;
|
||||
}
|
||||
|
||||
// RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters
|
||||
// that are required to describe the RuntimeClass to the Container Runtime
|
||||
// Interface (CRI) implementation, as well as any other components that need to
|
||||
// understand how the pod will be run. The RuntimeClassSpec is immutable.
|
||||
message RuntimeClassSpec {
|
||||
// RuntimeHandler specifies the underlying runtime and configuration that the
|
||||
// CRI implementation will use to handle pods of this class. The possible
|
||||
// values are specific to the node & CRI configuration. It is assumed that
|
||||
// all handlers are available on every node, and handlers of the same name are
|
||||
// equivalent on every node.
|
||||
// For example, a handler called "runc" might specify that the runc OCI
|
||||
// runtime (using native Linux containers) will be used to run the containers
|
||||
// in a pod.
|
||||
// The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements
|
||||
// and is immutable.
|
||||
optional string runtimeHandler = 1;
|
||||
}
|
||||
|
52
vendor/k8s.io/api/node/v1alpha1/register.go
generated
vendored
Normal file
52
vendor/k8s.io/api/node/v1alpha1/register.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "node.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
// AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// addKnownTypes adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&RuntimeClass{},
|
||||
&RuntimeClassList{},
|
||||
)
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
75
vendor/k8s.io/api/node/v1alpha1/types.go
generated
vendored
Normal file
75
vendor/k8s.io/api/node/v1alpha1/types.go
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/*
|
||||
Copyright 2018 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is
|
||||
// responsible for resolving the RuntimeClassName reference before running the
|
||||
// pod. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
|
||||
type RuntimeClass struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Specification of the RuntimeClass
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status
|
||||
Spec RuntimeClassSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
}
|
||||
|
||||
// RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters
|
||||
// that are required to describe the RuntimeClass to the Container Runtime
|
||||
// Interface (CRI) implementation, as well as any other components that need to
|
||||
// understand how the pod will be run. The RuntimeClassSpec is immutable.
|
||||
type RuntimeClassSpec struct {
|
||||
// RuntimeHandler specifies the underlying runtime and configuration that the
|
||||
// CRI implementation will use to handle pods of this class. The possible
|
||||
// values are specific to the node & CRI configuration. It is assumed that
|
||||
// all handlers are available on every node, and handlers of the same name are
|
||||
// equivalent on every node.
|
||||
// For example, a handler called "runc" might specify that the runc OCI
|
||||
// runtime (using native Linux containers) will be used to run the containers
|
||||
// in a pod.
|
||||
// The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements
|
||||
// and is immutable.
|
||||
RuntimeHandler string `json:"runtimeHandler" protobuf:"bytes,1,opt,name=runtimeHandler"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// RuntimeClassList is a list of RuntimeClass objects.
|
||||
type RuntimeClassList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of schema objects.
|
||||
Items []RuntimeClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
59
vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go
generated
vendored
Normal file
59
vendor/k8s.io/api/node/v1alpha1/types_swagger_doc_generated.go
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_RuntimeClass = map[string]string{
|
||||
"": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md",
|
||||
"metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"spec": "Specification of the RuntimeClass More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
|
||||
}
|
||||
|
||||
func (RuntimeClass) SwaggerDoc() map[string]string {
|
||||
return map_RuntimeClass
|
||||
}
|
||||
|
||||
var map_RuntimeClassList = map[string]string{
|
||||
"": "RuntimeClassList is a list of RuntimeClass objects.",
|
||||
"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is a list of schema objects.",
|
||||
}
|
||||
|
||||
func (RuntimeClassList) SwaggerDoc() map[string]string {
|
||||
return map_RuntimeClassList
|
||||
}
|
||||
|
||||
var map_RuntimeClassSpec = map[string]string{
|
||||
"": "RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.",
|
||||
"runtimeHandler": "RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.",
|
||||
}
|
||||
|
||||
func (RuntimeClassSpec) SwaggerDoc() map[string]string {
|
||||
return map_RuntimeClassSpec
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
101
vendor/k8s.io/api/node/v1alpha1/zz_generated.deepcopy.go
generated
vendored
Normal file
101
vendor/k8s.io/api/node/v1alpha1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClass) DeepCopyInto(out *RuntimeClass) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
out.Spec = in.Spec
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClass.
|
||||
func (in *RuntimeClass) DeepCopy() *RuntimeClass {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RuntimeClass)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RuntimeClass) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClassList) DeepCopyInto(out *RuntimeClassList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RuntimeClass, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClassList.
|
||||
func (in *RuntimeClassList) DeepCopy() *RuntimeClassList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RuntimeClassList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RuntimeClassList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClassSpec) DeepCopyInto(out *RuntimeClassSpec) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClassSpec.
|
||||
func (in *RuntimeClassSpec) DeepCopy() *RuntimeClassSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RuntimeClassSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
22
vendor/k8s.io/api/node/v1beta1/doc.go
generated
vendored
Normal file
22
vendor/k8s.io/api/node/v1beta1/doc.go
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=node.k8s.io
|
||||
|
||||
package v1beta1
|
564
vendor/k8s.io/api/node/v1beta1/generated.pb.go
generated
vendored
Normal file
564
vendor/k8s.io/api/node/v1beta1/generated.pb.go
generated
vendored
Normal file
@ -0,0 +1,564 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto
|
||||
|
||||
/*
|
||||
Package v1beta1 is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
RuntimeClass
|
||||
RuntimeClassList
|
||||
*/
|
||||
package v1beta1
|
||||
|
||||
import proto "github.com/gogo/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
|
||||
import io "io"
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
func (m *RuntimeClass) Reset() { *m = RuntimeClass{} }
|
||||
func (*RuntimeClass) ProtoMessage() {}
|
||||
func (*RuntimeClass) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{0} }
|
||||
|
||||
func (m *RuntimeClassList) Reset() { *m = RuntimeClassList{} }
|
||||
func (*RuntimeClassList) ProtoMessage() {}
|
||||
func (*RuntimeClassList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{1} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RuntimeClass)(nil), "k8s.io.api.node.v1beta1.RuntimeClass")
|
||||
proto.RegisterType((*RuntimeClassList)(nil), "k8s.io.api.node.v1beta1.RuntimeClassList")
|
||||
}
|
||||
func (m *RuntimeClass) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClass) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size()))
|
||||
n1, err := m.ObjectMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Handler)))
|
||||
i += copy(dAtA[i:], m.Handler)
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size()))
|
||||
n2, err := m.ListMeta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n2
|
||||
if len(m.Items) > 0 {
|
||||
for _, msg := range m.Items {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintGenerated(dAtA, i, uint64(msg.Size()))
|
||||
n, err := msg.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *RuntimeClass) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ObjectMeta.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
l = len(m.Handler)
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *RuntimeClassList) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = m.ListMeta.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
if len(m.Items) > 0 {
|
||||
for _, e := range m.Items {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovGenerated(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovGenerated(x uint64) (n int) {
|
||||
for {
|
||||
n++
|
||||
x >>= 7
|
||||
if x == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
func sozGenerated(x uint64) (n int) {
|
||||
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *RuntimeClass) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&RuntimeClass{`,
|
||||
`ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ObjectMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Handler:` + fmt.Sprintf("%v", this.Handler) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *RuntimeClassList) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&RuntimeClassList{`,
|
||||
`ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "k8s_io_apimachinery_pkg_apis_meta_v1.ListMeta", 1), `&`, ``, 1) + `,`,
|
||||
`Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "RuntimeClass", "RuntimeClass", 1), `&`, ``, 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func valueToStringGenerated(v interface{}) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *RuntimeClass) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: RuntimeClass: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: RuntimeClass: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Handler", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Handler = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *RuntimeClassList) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: RuntimeClassList: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: RuntimeClassList: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Items = append(m.Items, RuntimeClass{})
|
||||
if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGenerated(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthGenerated
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipGenerated(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
return iNdEx, nil
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
iNdEx += length
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthGenerated
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 3:
|
||||
for {
|
||||
var innerWire uint64
|
||||
var start int = iNdEx
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowGenerated
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
innerWire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
innerWireType := int(innerWire & 0x7)
|
||||
if innerWireType == 4 {
|
||||
break
|
||||
}
|
||||
next, err := skipGenerated(dAtA[start:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
iNdEx = start + next
|
||||
}
|
||||
return iNdEx, nil
|
||||
case 4:
|
||||
return iNdEx, nil
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
return iNdEx, nil
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
}
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow")
|
||||
)
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/node/v1beta1/generated.proto", fileDescriptorGenerated)
|
||||
}
|
||||
|
||||
var fileDescriptorGenerated = []byte{
|
||||
// 389 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6a, 0xdb, 0x40,
|
||||
0x14, 0x85, 0x35, 0x2e, 0xc6, 0xae, 0xdc, 0x52, 0xa3, 0x4d, 0x8d, 0x17, 0x63, 0x63, 0x28, 0xb8,
|
||||
0x0b, 0xcf, 0xd4, 0xa6, 0x94, 0x2e, 0x8b, 0xba, 0x69, 0x4b, 0x4b, 0x41, 0xcb, 0x90, 0x45, 0x46,
|
||||
0xd2, 0x8d, 0x34, 0x91, 0xa5, 0x11, 0x9a, 0x91, 0x20, 0xbb, 0x3c, 0x42, 0xf6, 0x79, 0x95, 0x3c,
|
||||
0x80, 0x97, 0x5e, 0x7a, 0x65, 0x62, 0xe5, 0x45, 0x82, 0x7e, 0xfc, 0x43, 0x8c, 0x49, 0x76, 0xba,
|
||||
0xe7, 0x9e, 0x73, 0xee, 0x87, 0x18, 0xfd, 0x47, 0xf0, 0x5d, 0x12, 0x2e, 0x68, 0x90, 0xda, 0x90,
|
||||
0x44, 0xa0, 0x40, 0xd2, 0x0c, 0x22, 0x57, 0x24, 0xb4, 0x5e, 0xb0, 0x98, 0xd3, 0x48, 0xb8, 0x40,
|
||||
0xb3, 0xa9, 0x0d, 0x8a, 0x4d, 0xa9, 0x07, 0x11, 0x24, 0x4c, 0x81, 0x4b, 0xe2, 0x44, 0x28, 0x61,
|
||||
0x7c, 0xac, 0x8c, 0x84, 0xc5, 0x9c, 0x14, 0x46, 0x52, 0x1b, 0xfb, 0x13, 0x8f, 0x2b, 0x3f, 0xb5,
|
||||
0x89, 0x23, 0x42, 0xea, 0x09, 0x4f, 0xd0, 0xd2, 0x6f, 0xa7, 0x97, 0xe5, 0x54, 0x0e, 0xe5, 0x57,
|
||||
0xd5, 0xd3, 0xff, 0xba, 0x3f, 0x18, 0x32, 0xc7, 0xe7, 0x11, 0x24, 0xd7, 0x34, 0x0e, 0xbc, 0x42,
|
||||
0x90, 0x34, 0x04, 0xc5, 0x68, 0x76, 0x74, 0xbd, 0x4f, 0x4f, 0xa5, 0x92, 0x34, 0x52, 0x3c, 0x84,
|
||||
0xa3, 0xc0, 0xb7, 0x97, 0x02, 0xd2, 0xf1, 0x21, 0x64, 0xcf, 0x73, 0xa3, 0x3b, 0xa4, 0xbf, 0xb3,
|
||||
0x2a, 0xcb, 0xcf, 0x39, 0x93, 0xd2, 0xb8, 0xd0, 0xdb, 0x05, 0x94, 0xcb, 0x14, 0xeb, 0xa1, 0x21,
|
||||
0x1a, 0x77, 0x66, 0x5f, 0xc8, 0xfe, 0x57, 0xec, 0xba, 0x49, 0x1c, 0x78, 0x85, 0x20, 0x49, 0xe1,
|
||||
0x26, 0xd9, 0x94, 0xfc, 0xb7, 0xaf, 0xc0, 0x51, 0xff, 0x40, 0x31, 0xd3, 0x58, 0xac, 0x07, 0x5a,
|
||||
0xbe, 0x1e, 0xe8, 0x7b, 0xcd, 0xda, 0xb5, 0x1a, 0x9f, 0xf5, 0x96, 0xcf, 0x22, 0x77, 0x0e, 0x49,
|
||||
0xaf, 0x31, 0x44, 0xe3, 0xb7, 0xe6, 0x87, 0xda, 0xde, 0xfa, 0x55, 0xc9, 0xd6, 0x76, 0x3f, 0xba,
|
||||
0x47, 0x7a, 0xf7, 0x90, 0xee, 0x2f, 0x97, 0xca, 0x38, 0x3f, 0x22, 0x24, 0xaf, 0x23, 0x2c, 0xd2,
|
||||
0x25, 0x5f, 0xb7, 0x3e, 0xd8, 0xde, 0x2a, 0x07, 0x74, 0x7f, 0xf4, 0x26, 0x57, 0x10, 0xca, 0x5e,
|
||||
0x63, 0xf8, 0x66, 0xdc, 0x99, 0x7d, 0x22, 0x27, 0xde, 0x01, 0x39, 0xe4, 0x32, 0xdf, 0xd7, 0x8d,
|
||||
0xcd, 0xdf, 0x45, 0xd6, 0xaa, 0x2a, 0xcc, 0xc9, 0x62, 0x83, 0xb5, 0xe5, 0x06, 0x6b, 0xab, 0x0d,
|
||||
0xd6, 0x6e, 0x72, 0x8c, 0x16, 0x39, 0x46, 0xcb, 0x1c, 0xa3, 0x55, 0x8e, 0xd1, 0x43, 0x8e, 0xd1,
|
||||
0xed, 0x23, 0xd6, 0xce, 0x5a, 0x75, 0xe3, 0x53, 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x68, 0xe5,
|
||||
0x0d, 0xb5, 0x02, 0x00, 0x00,
|
||||
}
|
66
vendor/k8s.io/api/node/v1beta1/generated.proto
generated
vendored
Normal file
66
vendor/k8s.io/api/node/v1beta1/generated.proto
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package k8s.io.api.node.v1beta1;
|
||||
|
||||
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/generated.proto";
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1beta1";
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is
|
||||
// responsible for resolving the RuntimeClassName reference before running the
|
||||
// pod. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
|
||||
message RuntimeClass {
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Handler specifies the underlying runtime and configuration that the CRI
|
||||
// implementation will use to handle pods of this class. The possible values
|
||||
// are specific to the node & CRI configuration. It is assumed that all
|
||||
// handlers are available on every node, and handlers of the same name are
|
||||
// equivalent on every node.
|
||||
// For example, a handler called "runc" might specify that the runc OCI
|
||||
// runtime (using native Linux containers) will be used to run the containers
|
||||
// in a pod.
|
||||
// The Handler must conform to the DNS Label (RFC 1123) requirements, and is
|
||||
// immutable.
|
||||
optional string handler = 2;
|
||||
}
|
||||
|
||||
// RuntimeClassList is a list of RuntimeClass objects.
|
||||
message RuntimeClassList {
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of schema objects.
|
||||
repeated RuntimeClass items = 2;
|
||||
}
|
||||
|
52
vendor/k8s.io/api/node/v1beta1/register.go
generated
vendored
Normal file
52
vendor/k8s.io/api/node/v1beta1/register.go
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// GroupName is the group name use in this package
|
||||
const GroupName = "node.k8s.io"
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
// AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// addKnownTypes adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&RuntimeClass{},
|
||||
&RuntimeClassList{},
|
||||
)
|
||||
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
65
vendor/k8s.io/api/node/v1beta1/types.go
generated
vendored
Normal file
65
vendor/k8s.io/api/node/v1beta1/types.go
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genclient:nonNamespaced
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// RuntimeClass defines a class of container runtime supported in the cluster.
|
||||
// The RuntimeClass is used to determine which container runtime is used to run
|
||||
// all containers in a pod. RuntimeClasses are (currently) manually defined by a
|
||||
// user or cluster provisioner, and referenced in the PodSpec. The Kubelet is
|
||||
// responsible for resolving the RuntimeClassName reference before running the
|
||||
// pod. For more details, see
|
||||
// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md
|
||||
type RuntimeClass struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Handler specifies the underlying runtime and configuration that the CRI
|
||||
// implementation will use to handle pods of this class. The possible values
|
||||
// are specific to the node & CRI configuration. It is assumed that all
|
||||
// handlers are available on every node, and handlers of the same name are
|
||||
// equivalent on every node.
|
||||
// For example, a handler called "runc" might specify that the runc OCI
|
||||
// runtime (using native Linux containers) will be used to run the containers
|
||||
// in a pod.
|
||||
// The Handler must conform to the DNS Label (RFC 1123) requirements, and is
|
||||
// immutable.
|
||||
Handler string `json:"handler" protobuf:"bytes,2,opt,name=handler"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// RuntimeClassList is a list of RuntimeClass objects.
|
||||
type RuntimeClassList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// Standard list metadata.
|
||||
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of schema objects.
|
||||
Items []RuntimeClass `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
50
vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go
generated
vendored
Normal file
50
vendor/k8s.io/api/node/v1beta1/types_swagger_doc_generated.go
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package v1beta1
|
||||
|
||||
// This file contains a collection of methods that can be used from go-restful to
|
||||
// generate Swagger API documentation for its models. Please read this PR for more
|
||||
// information on the implementation: https://github.com/emicklei/go-restful/pull/215
|
||||
//
|
||||
// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if
|
||||
// they are on one line! For multiple line or blocks that you want to ignore use ---.
|
||||
// Any context after a --- is ignored.
|
||||
//
|
||||
// Those methods can be generated by using hack/update-generated-swagger-docs.sh
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
|
||||
var map_RuntimeClass = map[string]string{
|
||||
"": "RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md",
|
||||
"metadata": "More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"handler": "Handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \"runc\" might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must conform to the DNS Label (RFC 1123) requirements, and is immutable.",
|
||||
}
|
||||
|
||||
func (RuntimeClass) SwaggerDoc() map[string]string {
|
||||
return map_RuntimeClass
|
||||
}
|
||||
|
||||
var map_RuntimeClassList = map[string]string{
|
||||
"": "RuntimeClassList is a list of RuntimeClass objects.",
|
||||
"metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata",
|
||||
"items": "Items is a list of schema objects.",
|
||||
}
|
||||
|
||||
func (RuntimeClassList) SwaggerDoc() map[string]string {
|
||||
return map_RuntimeClassList
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
84
vendor/k8s.io/api/node/v1beta1/zz_generated.deepcopy.go
generated
vendored
Normal file
84
vendor/k8s.io/api/node/v1beta1/zz_generated.deepcopy.go
generated
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClass) DeepCopyInto(out *RuntimeClass) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClass.
|
||||
func (in *RuntimeClass) DeepCopy() *RuntimeClass {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RuntimeClass)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RuntimeClass) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *RuntimeClassList) DeepCopyInto(out *RuntimeClassList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]RuntimeClass, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeClassList.
|
||||
func (in *RuntimeClassList) DeepCopy() *RuntimeClassList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(RuntimeClassList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *RuntimeClassList) DeepCopyObject() runtime.Object {
|
||||
if c := in.DeepCopy(); c != nil {
|
||||
return c
|
||||
}
|
||||
return nil
|
||||
}
|
1
vendor/k8s.io/api/policy/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/policy/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// Package policy is for any kind of policy object. Suitable examples, even if
|
||||
|
1
vendor/k8s.io/api/rbac/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/rbac/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
|
1
vendor/k8s.io/api/rbac/v1alpha1/doc.go
generated
vendored
1
vendor/k8s.io/api/rbac/v1alpha1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
|
1
vendor/k8s.io/api/rbac/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/rbac/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=rbac.authorization.k8s.io
|
||||
|
1
vendor/k8s.io/api/scheduling/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/scheduling/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=scheduling.k8s.io
|
||||
|
1
vendor/k8s.io/api/scheduling/v1alpha1/doc.go
generated
vendored
1
vendor/k8s.io/api/scheduling/v1alpha1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=scheduling.k8s.io
|
||||
|
1
vendor/k8s.io/api/scheduling/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/scheduling/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=scheduling.k8s.io
|
||||
|
1
vendor/k8s.io/api/settings/v1alpha1/doc.go
generated
vendored
1
vendor/k8s.io/api/settings/v1alpha1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +groupName=settings.k8s.io
|
||||
|
1
vendor/k8s.io/api/storage/v1/doc.go
generated
vendored
1
vendor/k8s.io/api/storage/v1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +groupName=storage.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
|
3
vendor/k8s.io/api/storage/v1alpha1/doc.go
generated
vendored
3
vendor/k8s.io/api/storage/v1alpha1/doc.go
generated
vendored
@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +groupName=storage.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
|
1
vendor/k8s.io/api/storage/v1beta1/doc.go
generated
vendored
1
vendor/k8s.io/api/storage/v1beta1/doc.go
generated
vendored
@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +k8s:protobuf-gen=package
|
||||
// +groupName=storage.k8s.io
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
|
6
vendor/k8s.io/client-go/informers/factory.go
generated
vendored
6
vendor/k8s.io/client-go/informers/factory.go
generated
vendored
@ -38,6 +38,7 @@ import (
|
||||
extensions "k8s.io/client-go/informers/extensions"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
networking "k8s.io/client-go/informers/networking"
|
||||
node "k8s.io/client-go/informers/node"
|
||||
policy "k8s.io/client-go/informers/policy"
|
||||
rbac "k8s.io/client-go/informers/rbac"
|
||||
scheduling "k8s.io/client-go/informers/scheduling"
|
||||
@ -198,6 +199,7 @@ type SharedInformerFactory interface {
|
||||
Events() events.Interface
|
||||
Extensions() extensions.Interface
|
||||
Networking() networking.Interface
|
||||
Node() node.Interface
|
||||
Policy() policy.Interface
|
||||
Rbac() rbac.Interface
|
||||
Scheduling() scheduling.Interface
|
||||
@ -249,6 +251,10 @@ func (f *sharedInformerFactory) Networking() networking.Interface {
|
||||
return networking.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Node() node.Interface {
|
||||
return node.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *sharedInformerFactory) Policy() policy.Interface {
|
||||
return policy.New(f, f.namespace, f.tweakListOptions)
|
||||
}
|
||||
|
10
vendor/k8s.io/client-go/informers/generic.go
generated
vendored
10
vendor/k8s.io/client-go/informers/generic.go
generated
vendored
@ -40,6 +40,8 @@ import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/api/networking/v1"
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
nodev1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
nodev1beta1 "k8s.io/api/node/v1beta1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
@ -217,6 +219,14 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
|
||||
case networkingv1beta1.SchemeGroupVersion.WithResource("ingresses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().Ingresses().Informer()}, nil
|
||||
|
||||
// Group=node.k8s.io, Version=v1alpha1
|
||||
case nodev1alpha1.SchemeGroupVersion.WithResource("runtimeclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Node().V1alpha1().RuntimeClasses().Informer()}, nil
|
||||
|
||||
// Group=node.k8s.io, Version=v1beta1
|
||||
case nodev1beta1.SchemeGroupVersion.WithResource("runtimeclasses"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Node().V1beta1().RuntimeClasses().Informer()}, nil
|
||||
|
||||
// Group=policy, Version=v1beta1
|
||||
case policyv1beta1.SchemeGroupVersion.WithResource("poddisruptionbudgets"):
|
||||
return &genericInformer{resource: resource.GroupResource(), informer: f.Policy().V1beta1().PodDisruptionBudgets().Informer()}, nil
|
||||
|
54
vendor/k8s.io/client-go/informers/node/interface.go
generated
vendored
Normal file
54
vendor/k8s.io/client-go/informers/node/interface.go
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package node
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
v1alpha1 "k8s.io/client-go/informers/node/v1alpha1"
|
||||
v1beta1 "k8s.io/client-go/informers/node/v1beta1"
|
||||
)
|
||||
|
||||
// Interface provides access to each of this group's versions.
|
||||
type Interface interface {
|
||||
// V1alpha1 provides access to shared informers for resources in V1alpha1.
|
||||
V1alpha1() v1alpha1.Interface
|
||||
// V1beta1 provides access to shared informers for resources in V1beta1.
|
||||
V1beta1() v1beta1.Interface
|
||||
}
|
||||
|
||||
type group struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// V1alpha1 returns a new v1alpha1.Interface.
|
||||
func (g *group) V1alpha1() v1alpha1.Interface {
|
||||
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
||||
|
||||
// V1beta1 returns a new v1beta1.Interface.
|
||||
func (g *group) V1beta1() v1beta1.Interface {
|
||||
return v1beta1.New(g.factory, g.namespace, g.tweakListOptions)
|
||||
}
|
45
vendor/k8s.io/client-go/informers/node/v1alpha1/interface.go
generated
vendored
Normal file
45
vendor/k8s.io/client-go/informers/node/v1alpha1/interface.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// RuntimeClasses returns a RuntimeClassInformer.
|
||||
RuntimeClasses() RuntimeClassInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// RuntimeClasses returns a RuntimeClassInformer.
|
||||
func (v *version) RuntimeClasses() RuntimeClassInformer {
|
||||
return &runtimeClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
88
vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
88
vendor/k8s.io/client-go/informers/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
nodev1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1alpha1 "k8s.io/client-go/listers/node/v1alpha1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RuntimeClassInformer provides access to a shared informer and lister for
|
||||
// RuntimeClasses.
|
||||
type RuntimeClassInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1alpha1.RuntimeClassLister
|
||||
}
|
||||
|
||||
type runtimeClassInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewRuntimeClassInformer constructs a new informer for RuntimeClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewRuntimeClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredRuntimeClassInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredRuntimeClassInformer constructs a new informer for RuntimeClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NodeV1alpha1().RuntimeClasses().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NodeV1alpha1().RuntimeClasses().Watch(options)
|
||||
},
|
||||
},
|
||||
&nodev1alpha1.RuntimeClass{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredRuntimeClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&nodev1alpha1.RuntimeClass{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) Lister() v1alpha1.RuntimeClassLister {
|
||||
return v1alpha1.NewRuntimeClassLister(f.Informer().GetIndexer())
|
||||
}
|
45
vendor/k8s.io/client-go/informers/node/v1beta1/interface.go
generated
vendored
Normal file
45
vendor/k8s.io/client-go/informers/node/v1beta1/interface.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
)
|
||||
|
||||
// Interface provides access to all the informers in this group version.
|
||||
type Interface interface {
|
||||
// RuntimeClasses returns a RuntimeClassInformer.
|
||||
RuntimeClasses() RuntimeClassInformer
|
||||
}
|
||||
|
||||
type version struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
namespace string
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// New returns a new Interface.
|
||||
func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface {
|
||||
return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
|
||||
}
|
||||
|
||||
// RuntimeClasses returns a RuntimeClassInformer.
|
||||
func (v *version) RuntimeClasses() RuntimeClassInformer {
|
||||
return &runtimeClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
|
||||
}
|
88
vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
88
vendor/k8s.io/client-go/informers/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by informer-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
||||
|
||||
nodev1beta1 "k8s.io/api/node/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
|
||||
kubernetes "k8s.io/client-go/kubernetes"
|
||||
v1beta1 "k8s.io/client-go/listers/node/v1beta1"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RuntimeClassInformer provides access to a shared informer and lister for
|
||||
// RuntimeClasses.
|
||||
type RuntimeClassInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.RuntimeClassLister
|
||||
}
|
||||
|
||||
type runtimeClassInformer struct {
|
||||
factory internalinterfaces.SharedInformerFactory
|
||||
tweakListOptions internalinterfaces.TweakListOptionsFunc
|
||||
}
|
||||
|
||||
// NewRuntimeClassInformer constructs a new informer for RuntimeClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewRuntimeClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
|
||||
return NewFilteredRuntimeClassInformer(client, resyncPeriod, indexers, nil)
|
||||
}
|
||||
|
||||
// NewFilteredRuntimeClassInformer constructs a new informer for RuntimeClass type.
|
||||
// Always prefer using an informer factory to get a shared informer instead of getting an independent
|
||||
// one. This reduces memory footprint and number of connections to the server.
|
||||
func NewFilteredRuntimeClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
|
||||
return cache.NewSharedIndexInformer(
|
||||
&cache.ListWatch{
|
||||
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NodeV1beta1().RuntimeClasses().List(options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.NodeV1beta1().RuntimeClasses().Watch(options)
|
||||
},
|
||||
},
|
||||
&nodev1beta1.RuntimeClass{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
|
||||
return NewFilteredRuntimeClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&nodev1beta1.RuntimeClass{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *runtimeClassInformer) Lister() v1beta1.RuntimeClassLister {
|
||||
return v1beta1.NewRuntimeClassLister(f.Informer().GetIndexer())
|
||||
}
|
28
vendor/k8s.io/client-go/kubernetes/clientset.go
generated
vendored
28
vendor/k8s.io/client-go/kubernetes/clientset.go
generated
vendored
@ -43,6 +43,8 @@ import (
|
||||
extensionsv1beta1 "k8s.io/client-go/kubernetes/typed/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1"
|
||||
networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
|
||||
nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
|
||||
nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1"
|
||||
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
||||
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
|
||||
@ -83,6 +85,8 @@ type Interface interface {
|
||||
ExtensionsV1beta1() extensionsv1beta1.ExtensionsV1beta1Interface
|
||||
NetworkingV1() networkingv1.NetworkingV1Interface
|
||||
NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface
|
||||
NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface
|
||||
NodeV1beta1() nodev1beta1.NodeV1beta1Interface
|
||||
PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface
|
||||
RbacV1() rbacv1.RbacV1Interface
|
||||
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
|
||||
@ -123,6 +127,8 @@ type Clientset struct {
|
||||
extensionsV1beta1 *extensionsv1beta1.ExtensionsV1beta1Client
|
||||
networkingV1 *networkingv1.NetworkingV1Client
|
||||
networkingV1beta1 *networkingv1beta1.NetworkingV1beta1Client
|
||||
nodeV1alpha1 *nodev1alpha1.NodeV1alpha1Client
|
||||
nodeV1beta1 *nodev1beta1.NodeV1beta1Client
|
||||
policyV1beta1 *policyv1beta1.PolicyV1beta1Client
|
||||
rbacV1 *rbacv1.RbacV1Client
|
||||
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
|
||||
@ -251,6 +257,16 @@ func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Inter
|
||||
return c.networkingV1beta1
|
||||
}
|
||||
|
||||
// NodeV1alpha1 retrieves the NodeV1alpha1Client
|
||||
func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface {
|
||||
return c.nodeV1alpha1
|
||||
}
|
||||
|
||||
// NodeV1beta1 retrieves the NodeV1beta1Client
|
||||
func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface {
|
||||
return c.nodeV1beta1
|
||||
}
|
||||
|
||||
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
||||
func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
|
||||
return c.policyV1beta1
|
||||
@ -414,6 +430,14 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.nodeV1alpha1, err = nodev1alpha1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.nodeV1beta1, err = nodev1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cs.policyV1beta1, err = policyv1beta1.NewForConfig(&configShallowCopy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -493,6 +517,8 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
|
||||
cs.extensionsV1beta1 = extensionsv1beta1.NewForConfigOrDie(c)
|
||||
cs.networkingV1 = networkingv1.NewForConfigOrDie(c)
|
||||
cs.networkingV1beta1 = networkingv1beta1.NewForConfigOrDie(c)
|
||||
cs.nodeV1alpha1 = nodev1alpha1.NewForConfigOrDie(c)
|
||||
cs.nodeV1beta1 = nodev1beta1.NewForConfigOrDie(c)
|
||||
cs.policyV1beta1 = policyv1beta1.NewForConfigOrDie(c)
|
||||
cs.rbacV1 = rbacv1.NewForConfigOrDie(c)
|
||||
cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c)
|
||||
@ -535,6 +561,8 @@ func New(c rest.Interface) *Clientset {
|
||||
cs.extensionsV1beta1 = extensionsv1beta1.New(c)
|
||||
cs.networkingV1 = networkingv1.New(c)
|
||||
cs.networkingV1beta1 = networkingv1beta1.New(c)
|
||||
cs.nodeV1alpha1 = nodev1alpha1.New(c)
|
||||
cs.nodeV1beta1 = nodev1beta1.New(c)
|
||||
cs.policyV1beta1 = policyv1beta1.New(c)
|
||||
cs.rbacV1 = rbacv1.New(c)
|
||||
cs.rbacV1beta1 = rbacv1beta1.New(c)
|
||||
|
14
vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
generated
vendored
14
vendor/k8s.io/client-go/kubernetes/fake/clientset_generated.go
generated
vendored
@ -70,6 +70,10 @@ import (
|
||||
fakenetworkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1/fake"
|
||||
networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1"
|
||||
fakenetworkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1/fake"
|
||||
nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
|
||||
fakenodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake"
|
||||
nodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1"
|
||||
fakenodev1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1/fake"
|
||||
policyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1"
|
||||
fakepolicyv1beta1 "k8s.io/client-go/kubernetes/typed/policy/v1beta1/fake"
|
||||
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
|
||||
@ -252,6 +256,16 @@ func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Inter
|
||||
return &fakenetworkingv1beta1.FakeNetworkingV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// NodeV1alpha1 retrieves the NodeV1alpha1Client
|
||||
func (c *Clientset) NodeV1alpha1() nodev1alpha1.NodeV1alpha1Interface {
|
||||
return &fakenodev1alpha1.FakeNodeV1alpha1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// NodeV1beta1 retrieves the NodeV1beta1Client
|
||||
func (c *Clientset) NodeV1beta1() nodev1beta1.NodeV1beta1Interface {
|
||||
return &fakenodev1beta1.FakeNodeV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// PolicyV1beta1 retrieves the PolicyV1beta1Client
|
||||
func (c *Clientset) PolicyV1beta1() policyv1beta1.PolicyV1beta1Interface {
|
||||
return &fakepolicyv1beta1.FakePolicyV1beta1{Fake: &c.Fake}
|
||||
|
4
vendor/k8s.io/client-go/kubernetes/fake/register.go
generated
vendored
4
vendor/k8s.io/client-go/kubernetes/fake/register.go
generated
vendored
@ -42,6 +42,8 @@ import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/api/networking/v1"
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
nodev1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
nodev1beta1 "k8s.io/api/node/v1beta1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
@ -87,6 +89,8 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
extensionsv1beta1.AddToScheme,
|
||||
networkingv1.AddToScheme,
|
||||
networkingv1beta1.AddToScheme,
|
||||
nodev1alpha1.AddToScheme,
|
||||
nodev1beta1.AddToScheme,
|
||||
policyv1beta1.AddToScheme,
|
||||
rbacv1.AddToScheme,
|
||||
rbacv1beta1.AddToScheme,
|
||||
|
4
vendor/k8s.io/client-go/kubernetes/scheme/register.go
generated
vendored
4
vendor/k8s.io/client-go/kubernetes/scheme/register.go
generated
vendored
@ -42,6 +42,8 @@ import (
|
||||
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
|
||||
networkingv1 "k8s.io/api/networking/v1"
|
||||
networkingv1beta1 "k8s.io/api/networking/v1beta1"
|
||||
nodev1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
nodev1beta1 "k8s.io/api/node/v1beta1"
|
||||
policyv1beta1 "k8s.io/api/policy/v1beta1"
|
||||
rbacv1 "k8s.io/api/rbac/v1"
|
||||
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
|
||||
@ -87,6 +89,8 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
extensionsv1beta1.AddToScheme,
|
||||
networkingv1.AddToScheme,
|
||||
networkingv1beta1.AddToScheme,
|
||||
nodev1alpha1.AddToScheme,
|
||||
nodev1beta1.AddToScheme,
|
||||
policyv1beta1.AddToScheme,
|
||||
rbacv1.AddToScheme,
|
||||
rbacv1beta1.AddToScheme,
|
||||
|
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1alpha1
|
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
40
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go
generated
vendored
Normal file
40
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_node_client.go
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeNodeV1alpha1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeNodeV1alpha1) RuntimeClasses() v1alpha1.RuntimeClassInterface {
|
||||
return &FakeRuntimeClasses{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeNodeV1alpha1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
120
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go
generated
vendored
Normal file
120
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/fake/fake_runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeRuntimeClasses implements RuntimeClassInterface
|
||||
type FakeRuntimeClasses struct {
|
||||
Fake *FakeNodeV1alpha1
|
||||
}
|
||||
|
||||
var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", Version: "v1alpha1", Resource: "runtimeclasses"}
|
||||
|
||||
var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1alpha1", Kind: "RuntimeClass"}
|
||||
|
||||
// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any.
|
||||
func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1alpha1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors.
|
||||
func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1alpha1.RuntimeClassList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.RuntimeClassList{ListMeta: obj.(*v1alpha1.RuntimeClassList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.RuntimeClassList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested runtimeClasses.
|
||||
func (c *FakeRuntimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *FakeRuntimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *FakeRuntimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1alpha1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeRuntimeClasses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(runtimeclassesResource, name), &v1alpha1.RuntimeClass{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeRuntimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.RuntimeClassList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched runtimeClass.
|
||||
func (c *FakeRuntimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1alpha1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1alpha1.RuntimeClass), err
|
||||
}
|
21
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/generated_expansion.go
generated
vendored
Normal file
21
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/generated_expansion.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
type RuntimeClassExpansion interface{}
|
90
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go
generated
vendored
Normal file
90
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/node_client.go
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type NodeV1alpha1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
RuntimeClassesGetter
|
||||
}
|
||||
|
||||
// NodeV1alpha1Client is used to interact with features provided by the node.k8s.io group.
|
||||
type NodeV1alpha1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NodeV1alpha1Client) RuntimeClasses() RuntimeClassInterface {
|
||||
return newRuntimeClasses(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NodeV1alpha1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*NodeV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &NodeV1alpha1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new NodeV1alpha1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *NodeV1alpha1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new NodeV1alpha1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *NodeV1alpha1Client {
|
||||
return &NodeV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *NodeV1alpha1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
164
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
164
vendor/k8s.io/client-go/kubernetes/typed/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// RuntimeClassesGetter has a method to return a RuntimeClassInterface.
|
||||
// A group's client should implement this interface.
|
||||
type RuntimeClassesGetter interface {
|
||||
RuntimeClasses() RuntimeClassInterface
|
||||
}
|
||||
|
||||
// RuntimeClassInterface has methods to work with RuntimeClass resources.
|
||||
type RuntimeClassInterface interface {
|
||||
Create(*v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error)
|
||||
Update(*v1alpha1.RuntimeClass) (*v1alpha1.RuntimeClass, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1alpha1.RuntimeClass, error)
|
||||
List(opts v1.ListOptions) (*v1alpha1.RuntimeClassList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error)
|
||||
RuntimeClassExpansion
|
||||
}
|
||||
|
||||
// runtimeClasses implements RuntimeClassInterface
|
||||
type runtimeClasses struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newRuntimeClasses returns a RuntimeClasses
|
||||
func newRuntimeClasses(c *NodeV1alpha1Client) *runtimeClasses {
|
||||
return &runtimeClasses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any.
|
||||
func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1alpha1.RuntimeClass, err error) {
|
||||
result = &v1alpha1.RuntimeClass{}
|
||||
err = c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors.
|
||||
func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1alpha1.RuntimeClassList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1alpha1.RuntimeClassList{}
|
||||
err = c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested runtimeClasses.
|
||||
func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *runtimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) {
|
||||
result = &v1alpha1.RuntimeClass{}
|
||||
err = c.client.Post().
|
||||
Resource("runtimeclasses").
|
||||
Body(runtimeClass).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *runtimeClasses) Update(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) {
|
||||
result = &v1alpha1.RuntimeClass{}
|
||||
err = c.client.Put().
|
||||
Resource("runtimeclasses").
|
||||
Name(runtimeClass.Name).
|
||||
Body(runtimeClass).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs.
|
||||
func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("runtimeclasses").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched runtimeClass.
|
||||
func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.RuntimeClass, err error) {
|
||||
result = &v1alpha1.RuntimeClass{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("runtimeclasses").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated typed clients.
|
||||
package v1beta1
|
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go
generated
vendored
Normal file
20
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
40
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go
generated
vendored
Normal file
40
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_node_client.go
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/client-go/kubernetes/typed/node/v1beta1"
|
||||
rest "k8s.io/client-go/rest"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
type FakeNodeV1beta1 struct {
|
||||
*testing.Fake
|
||||
}
|
||||
|
||||
func (c *FakeNodeV1beta1) RuntimeClasses() v1beta1.RuntimeClassInterface {
|
||||
return &FakeRuntimeClasses{c}
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *FakeNodeV1beta1) RESTClient() rest.Interface {
|
||||
var ret *rest.RESTClient
|
||||
return ret
|
||||
}
|
120
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go
generated
vendored
Normal file
120
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/fake/fake_runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/node/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// FakeRuntimeClasses implements RuntimeClassInterface
|
||||
type FakeRuntimeClasses struct {
|
||||
Fake *FakeNodeV1beta1
|
||||
}
|
||||
|
||||
var runtimeclassesResource = schema.GroupVersionResource{Group: "node.k8s.io", Version: "v1beta1", Resource: "runtimeclasses"}
|
||||
|
||||
var runtimeclassesKind = schema.GroupVersionKind{Group: "node.k8s.io", Version: "v1beta1", Kind: "RuntimeClass"}
|
||||
|
||||
// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any.
|
||||
func (c *FakeRuntimeClasses) Get(name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(runtimeclassesResource, name), &v1beta1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors.
|
||||
func (c *FakeRuntimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(runtimeclassesResource, runtimeclassesKind, opts), &v1beta1.RuntimeClassList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.RuntimeClassList{ListMeta: obj.(*v1beta1.RuntimeClassList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.RuntimeClassList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested runtimeClasses.
|
||||
func (c *FakeRuntimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(runtimeclassesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *FakeRuntimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *FakeRuntimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(runtimeclassesResource, runtimeClass), &v1beta1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.RuntimeClass), err
|
||||
}
|
||||
|
||||
// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeRuntimeClasses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteAction(runtimeclassesResource, name), &v1beta1.RuntimeClass{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeRuntimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(runtimeclassesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.RuntimeClassList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched runtimeClass.
|
||||
func (c *FakeRuntimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(runtimeclassesResource, name, pt, data, subresources...), &v1beta1.RuntimeClass{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*v1beta1.RuntimeClass), err
|
||||
}
|
21
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/generated_expansion.go
generated
vendored
Normal file
21
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/generated_expansion.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
type RuntimeClassExpansion interface{}
|
90
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go
generated
vendored
Normal file
90
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/node_client.go
generated
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/node/v1beta1"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
"k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
type NodeV1beta1Interface interface {
|
||||
RESTClient() rest.Interface
|
||||
RuntimeClassesGetter
|
||||
}
|
||||
|
||||
// NodeV1beta1Client is used to interact with features provided by the node.k8s.io group.
|
||||
type NodeV1beta1Client struct {
|
||||
restClient rest.Interface
|
||||
}
|
||||
|
||||
func (c *NodeV1beta1Client) RuntimeClasses() RuntimeClassInterface {
|
||||
return newRuntimeClasses(c)
|
||||
}
|
||||
|
||||
// NewForConfig creates a new NodeV1beta1Client for the given config.
|
||||
func NewForConfig(c *rest.Config) (*NodeV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client, err := rest.RESTClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &NodeV1beta1Client{client}, nil
|
||||
}
|
||||
|
||||
// NewForConfigOrDie creates a new NodeV1beta1Client for the given config and
|
||||
// panics if there is an error in the config.
|
||||
func NewForConfigOrDie(c *rest.Config) *NodeV1beta1Client {
|
||||
client, err := NewForConfig(c)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return client
|
||||
}
|
||||
|
||||
// New creates a new NodeV1beta1Client for the given RESTClient.
|
||||
func New(c rest.Interface) *NodeV1beta1Client {
|
||||
return &NodeV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
// with API server by this client implementation.
|
||||
func (c *NodeV1beta1Client) RESTClient() rest.Interface {
|
||||
if c == nil {
|
||||
return nil
|
||||
}
|
||||
return c.restClient
|
||||
}
|
164
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
164
vendor/k8s.io/client-go/kubernetes/typed/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "k8s.io/api/node/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
scheme "k8s.io/client-go/kubernetes/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
// RuntimeClassesGetter has a method to return a RuntimeClassInterface.
|
||||
// A group's client should implement this interface.
|
||||
type RuntimeClassesGetter interface {
|
||||
RuntimeClasses() RuntimeClassInterface
|
||||
}
|
||||
|
||||
// RuntimeClassInterface has methods to work with RuntimeClass resources.
|
||||
type RuntimeClassInterface interface {
|
||||
Create(*v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error)
|
||||
Update(*v1beta1.RuntimeClass) (*v1beta1.RuntimeClass, error)
|
||||
Delete(name string, options *v1.DeleteOptions) error
|
||||
DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
|
||||
Get(name string, options v1.GetOptions) (*v1beta1.RuntimeClass, error)
|
||||
List(opts v1.ListOptions) (*v1beta1.RuntimeClassList, error)
|
||||
Watch(opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error)
|
||||
RuntimeClassExpansion
|
||||
}
|
||||
|
||||
// runtimeClasses implements RuntimeClassInterface
|
||||
type runtimeClasses struct {
|
||||
client rest.Interface
|
||||
}
|
||||
|
||||
// newRuntimeClasses returns a RuntimeClasses
|
||||
func newRuntimeClasses(c *NodeV1beta1Client) *runtimeClasses {
|
||||
return &runtimeClasses{
|
||||
client: c.RESTClient(),
|
||||
}
|
||||
}
|
||||
|
||||
// Get takes name of the runtimeClass, and returns the corresponding runtimeClass object, and an error if there is any.
|
||||
func (c *runtimeClasses) Get(name string, options v1.GetOptions) (result *v1beta1.RuntimeClass, err error) {
|
||||
result = &v1beta1.RuntimeClass{}
|
||||
err = c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
Name(name).
|
||||
VersionedParams(&options, scheme.ParameterCodec).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of RuntimeClasses that match those selectors.
|
||||
func (c *runtimeClasses) List(opts v1.ListOptions) (result *v1beta1.RuntimeClassList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.RuntimeClassList{}
|
||||
err = c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested runtimeClasses.
|
||||
func (c *runtimeClasses) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Create takes the representation of a runtimeClass and creates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *runtimeClasses) Create(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) {
|
||||
result = &v1beta1.RuntimeClass{}
|
||||
err = c.client.Post().
|
||||
Resource("runtimeclasses").
|
||||
Body(runtimeClass).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Update takes the representation of a runtimeClass and updates it. Returns the server's representation of the runtimeClass, and an error, if there is any.
|
||||
func (c *runtimeClasses) Update(runtimeClass *v1beta1.RuntimeClass) (result *v1beta1.RuntimeClass, err error) {
|
||||
result = &v1beta1.RuntimeClass{}
|
||||
err = c.client.Put().
|
||||
Resource("runtimeclasses").
|
||||
Name(runtimeClass.Name).
|
||||
Body(runtimeClass).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
||||
|
||||
// Delete takes name of the runtimeClass and deletes it. Returns an error if one occurs.
|
||||
func (c *runtimeClasses) Delete(name string, options *v1.DeleteOptions) error {
|
||||
return c.client.Delete().
|
||||
Resource("runtimeclasses").
|
||||
Name(name).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *runtimeClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Resource("runtimeclasses").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched runtimeClass.
|
||||
func (c *runtimeClasses) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.RuntimeClass, err error) {
|
||||
result = &v1beta1.RuntimeClass{}
|
||||
err = c.client.Patch(pt).
|
||||
Resource("runtimeclasses").
|
||||
SubResource(subresources...).
|
||||
Name(name).
|
||||
Body(data).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
}
|
23
vendor/k8s.io/client-go/listers/node/v1alpha1/expansion_generated.go
generated
vendored
Normal file
23
vendor/k8s.io/client-go/listers/node/v1alpha1/expansion_generated.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
// RuntimeClassListerExpansion allows custom methods to be added to
|
||||
// RuntimeClassLister.
|
||||
type RuntimeClassListerExpansion interface{}
|
65
vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
65
vendor/k8s.io/client-go/listers/node/v1alpha1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1alpha1 "k8s.io/api/node/v1alpha1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RuntimeClassLister helps list RuntimeClasses.
|
||||
type RuntimeClassLister interface {
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error)
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
Get(name string) (*v1alpha1.RuntimeClass, error)
|
||||
RuntimeClassListerExpansion
|
||||
}
|
||||
|
||||
// runtimeClassLister implements the RuntimeClassLister interface.
|
||||
type runtimeClassLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewRuntimeClassLister returns a new RuntimeClassLister.
|
||||
func NewRuntimeClassLister(indexer cache.Indexer) RuntimeClassLister {
|
||||
return &runtimeClassLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1alpha1.RuntimeClass, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1alpha1.RuntimeClass))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
func (s *runtimeClassLister) Get(name string) (*v1alpha1.RuntimeClass, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1alpha1.Resource("runtimeclass"), name)
|
||||
}
|
||||
return obj.(*v1alpha1.RuntimeClass), nil
|
||||
}
|
23
vendor/k8s.io/client-go/listers/node/v1beta1/expansion_generated.go
generated
vendored
Normal file
23
vendor/k8s.io/client-go/listers/node/v1beta1/expansion_generated.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
// RuntimeClassListerExpansion allows custom methods to be added to
|
||||
// RuntimeClassLister.
|
||||
type RuntimeClassListerExpansion interface{}
|
65
vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
65
vendor/k8s.io/client-go/listers/node/v1beta1/runtimeclass.go
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by lister-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v1beta1 "k8s.io/api/node/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// RuntimeClassLister helps list RuntimeClasses.
|
||||
type RuntimeClassLister interface {
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error)
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
Get(name string) (*v1beta1.RuntimeClass, error)
|
||||
RuntimeClassListerExpansion
|
||||
}
|
||||
|
||||
// runtimeClassLister implements the RuntimeClassLister interface.
|
||||
type runtimeClassLister struct {
|
||||
indexer cache.Indexer
|
||||
}
|
||||
|
||||
// NewRuntimeClassLister returns a new RuntimeClassLister.
|
||||
func NewRuntimeClassLister(indexer cache.Indexer) RuntimeClassLister {
|
||||
return &runtimeClassLister{indexer: indexer}
|
||||
}
|
||||
|
||||
// List lists all RuntimeClasses in the indexer.
|
||||
func (s *runtimeClassLister) List(selector labels.Selector) (ret []*v1beta1.RuntimeClass, err error) {
|
||||
err = cache.ListAll(s.indexer, selector, func(m interface{}) {
|
||||
ret = append(ret, m.(*v1beta1.RuntimeClass))
|
||||
})
|
||||
return ret, err
|
||||
}
|
||||
|
||||
// Get retrieves the RuntimeClass from the index for a given name.
|
||||
func (s *runtimeClassLister) Get(name string) (*v1beta1.RuntimeClass, error) {
|
||||
obj, exists, err := s.indexer.GetByKey(name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !exists {
|
||||
return nil, errors.NewNotFound(v1beta1.Resource("runtimeclass"), name)
|
||||
}
|
||||
return obj.(*v1beta1.RuntimeClass), nil
|
||||
}
|
80
vendor/k8s.io/code-generator/Godeps/Godeps.json
generated
vendored
80
vendor/k8s.io/code-generator/Godeps/Godeps.json
generated
vendored
@ -154,6 +154,86 @@
|
||||
"ImportPath": "golang.org/x/tools/internal/semver",
|
||||
"Rev": "7f7074d5bcfd282eb16bc382b0bb3da762461985"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/blas",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/blas/blas64",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/blas/gonum",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/floats",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/internal/linear",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/internal/ordered",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/internal/set",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/internal/uid",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/simple",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/topo",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/graph/traverse",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/internal/asm/c128",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/internal/asm/f32",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/internal/asm/f64",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/internal/math32",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/lapack",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/lapack/gonum",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/lapack/lapack64",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "gonum.org/v1/gonum/mat",
|
||||
"Rev": "cebdade430ccb61c1feba4878085f6cf8cb3320e"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/gengo/args",
|
||||
"Rev": "51747d6e00da1fc578d5a333a93bb2abcbce7a95"
|
||||
|
83
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go
generated
vendored
83
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf/cmd.go
generated
vendored
@ -25,16 +25,20 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
"gonum.org/v1/gonum/graph"
|
||||
"gonum.org/v1/gonum/graph/simple"
|
||||
"gonum.org/v1/gonum/graph/topo"
|
||||
|
||||
"k8s.io/code-generator/pkg/util"
|
||||
"k8s.io/gengo/args"
|
||||
"k8s.io/gengo/generator"
|
||||
"k8s.io/gengo/namer"
|
||||
"k8s.io/gengo/parser"
|
||||
"k8s.io/gengo/types"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
type Generator struct {
|
||||
@ -202,6 +206,18 @@ func Run(g *Generator) {
|
||||
c.Verify = g.Common.VerifyOnly
|
||||
c.FileTypes["protoidl"] = NewProtoFile()
|
||||
|
||||
// order package by imports, importees first
|
||||
deps := deps(c, protobufNames.packages)
|
||||
order, err := importOrder(deps)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to order packages by imports: %v", err)
|
||||
}
|
||||
topologicalPos := map[string]int{}
|
||||
for i, p := range order {
|
||||
topologicalPos[p] = i
|
||||
}
|
||||
sort.Sort(positionOrder{topologicalPos, protobufNames.packages})
|
||||
|
||||
var vendoredOutputPackages, localOutputPackages generator.Packages
|
||||
for _, p := range protobufNames.packages {
|
||||
if _, ok := nonOutputPackages[p.Name()]; ok {
|
||||
@ -347,3 +363,66 @@ func Run(g *Generator) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func deps(c *generator.Context, pkgs []*protobufPackage) map[string][]string {
|
||||
ret := map[string][]string{}
|
||||
for _, p := range pkgs {
|
||||
for _, d := range c.Universe[p.PackagePath].Imports {
|
||||
ret[p.PackagePath] = append(ret[p.PackagePath], d.Path)
|
||||
}
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func importOrder(deps map[string][]string) ([]string, error) {
|
||||
nodes := map[string]graph.Node{}
|
||||
names := map[int64]string{}
|
||||
g := simple.NewDirectedGraph()
|
||||
for pkg, imports := range deps {
|
||||
for _, imp := range imports {
|
||||
if _, found := nodes[pkg]; !found {
|
||||
n := g.NewNode()
|
||||
g.AddNode(n)
|
||||
nodes[pkg] = n
|
||||
names[n.ID()] = pkg
|
||||
}
|
||||
if _, found := nodes[imp]; !found {
|
||||
n := g.NewNode()
|
||||
g.AddNode(n)
|
||||
nodes[imp] = n
|
||||
names[n.ID()] = imp
|
||||
}
|
||||
g.SetEdge(g.NewEdge(nodes[imp], nodes[pkg]))
|
||||
}
|
||||
}
|
||||
|
||||
ret := []string{}
|
||||
sorted, err := topo.Sort(g)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, n := range sorted {
|
||||
ret = append(ret, names[n.ID()])
|
||||
fmt.Println("topological order", names[n.ID()])
|
||||
}
|
||||
return ret, nil
|
||||
}
|
||||
|
||||
type positionOrder struct {
|
||||
pos map[string]int
|
||||
elements []*protobufPackage
|
||||
}
|
||||
|
||||
func (o positionOrder) Len() int {
|
||||
return len(o.elements)
|
||||
}
|
||||
|
||||
func (o positionOrder) Less(i, j int) bool {
|
||||
return o.pos[o.elements[i].PackagePath] < o.pos[o.elements[j].PackagePath]
|
||||
}
|
||||
|
||||
func (o positionOrder) Swap(i, j int) {
|
||||
x := o.elements[i]
|
||||
o.elements[i] = o.elements[j]
|
||||
o.elements[j] = x
|
||||
}
|
||||
|
70
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/AUTHORS
generated
vendored
Normal file
70
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/AUTHORS
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
# This is the official list of gonum authors for copyright purposes.
|
||||
# This file is distinct from the CONTRIBUTORS files.
|
||||
# See the latter for an explanation.
|
||||
|
||||
# Names should be added to this file as
|
||||
# Name or Organization <email address>
|
||||
# The email address is not required for organizations.
|
||||
|
||||
# Please keep the list sorted.
|
||||
|
||||
Brendan Tracey <tracey.brendan@gmail.com>
|
||||
Bill Gray <wgray@gogray.com>
|
||||
Bill Noon <noon.bill@gmail.com>
|
||||
Chad Kunde <kunde21@gmail.com>
|
||||
Chih-Wei Chang <bert.cwchang@gmail.com>
|
||||
Chris Tessum <ctessum@gmail.com>
|
||||
Dan Kortschak <dan.kortschak@adelaide.edu.au> <dan@kortschak.io>
|
||||
Daniel Fireman <danielfireman@gmail.com>
|
||||
David Samborski <bloggingarrow@gmail.com>
|
||||
Davor Kapsa <davor.kapsa@gmail.com>
|
||||
Egon Elbre <egonelbre@gmail.com>
|
||||
Ekaterina Efimova <katerina.efimova@gmail.com>
|
||||
Ethan Burns <burns.ethan@gmail.com>
|
||||
Evert Lammerts <evert.lammerts@gmail.com>
|
||||
Facundo Gaich <facugaich@gmail.com>
|
||||
Fazlul Shahriar <fshahriar@gmail.com>
|
||||
Francesc Campoy <campoy@golang.org>
|
||||
Google Inc
|
||||
Gustaf Johansson <gustaf@pinon.se>
|
||||
Iakov Davydov <iakov.davydov@unil.ch>
|
||||
Jalem Raj Rohit <jrajrohit33@gmail.com>
|
||||
James Bell <james@stellentus.com>
|
||||
James Bowman <james.edward.bowman@gmail.com>
|
||||
James Holmes <32bitkid@gmail.com>
|
||||
Janne Snabb <snabb@epipe.com>
|
||||
Jeff Juozapaitis <jjjuozap@email.arizona.edu>
|
||||
Jeremy Atkinson <jchatkinson@gmail.com>
|
||||
Jonas Kahler <jonas@derkahler.de>
|
||||
Jonathan J Lawlor <jonathan.lawlor@gmail.com>
|
||||
Jonathan Schroeder <jd.schroeder@gmail.com>
|
||||
Joseph Watson <jtwatson@linux-consulting.us>
|
||||
Josh Wilson <josh.craig.wilson@gmail.com>
|
||||
Julien Roland <juroland@gmail.com>
|
||||
Kent English <kent.english@gmail.com>
|
||||
Kevin C. Zimmerman <kevinczimmerman@gmail.com>
|
||||
Konstantin Shaposhnikov <k.shaposhnikov@gmail.com>
|
||||
Leonid Kneller <recondite.matter@gmail.com>
|
||||
Lyron Winderbaum <lyron.winderbaum@student.adelaide.edu.au>
|
||||
Matthieu Di Mercurio <matthieu.dimercurio@gmail.com>
|
||||
Max Halford <maxhalford25@gmail.com>
|
||||
MinJae Kwon <k239507@gmail.com>
|
||||
Or Rikon <rikonor@gmail.com>
|
||||
Pontus Melke <pontusmelke@gmail.com>
|
||||
Renée French
|
||||
Robin Eklind <r.eklind.87@gmail.com>
|
||||
Samuel Kelemen <Samuel@Kelemen.us>
|
||||
Sam Zaydel <szaydel@gmail.com>
|
||||
Scott Holden <scott@sshconnection.com>
|
||||
Sebastien Binet <seb.binet@gmail.com>
|
||||
source{d} <hello@sourced.tech>
|
||||
Shawn Smith <shawnpsmith@gmail.com>
|
||||
Spencer Lyon <spencerlyon2@gmail.com>
|
||||
Steve McCoy <mccoyst@gmail.com>
|
||||
Takeshi Yoneda <cz.rk.t0415y.g@gmail.com>
|
||||
The University of Adelaide
|
||||
The University of Minnesota
|
||||
The University of Washington
|
||||
Tobin Harding <me@tobin.cc>
|
||||
Vladimír Chalupecký <vladimir.chalupecky@gmail.com>
|
||||
Yevgeniy Vahlis <evahlis@gmail.com>
|
73
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/CONTRIBUTORS
generated
vendored
Normal file
73
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/CONTRIBUTORS
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
# This is the official list of people who can contribute
|
||||
# (and typically have contributed) code to the gonum
|
||||
# repository.
|
||||
#
|
||||
# The AUTHORS file lists the copyright holders; this file
|
||||
# lists people. For example, Google employees would be listed here
|
||||
# but not in AUTHORS, because Google would hold the copyright.
|
||||
#
|
||||
# When adding J Random Contributor's name to this file,
|
||||
# either J's name or J's organization's name should be
|
||||
# added to the AUTHORS file.
|
||||
#
|
||||
# Names should be added to this file like so:
|
||||
# Name <email address>
|
||||
#
|
||||
# Please keep the list sorted.
|
||||
|
||||
Andrew Brampton <brampton@gmail.com>
|
||||
Brendan Tracey <tracey.brendan@gmail.com>
|
||||
Bill Gray <wgray@gogray.com>
|
||||
Bill Noon <noon.bill@gmail.com>
|
||||
Chad Kunde <kunde21@gmail.com>
|
||||
Chih-Wei Chang <bert.cwchang@gmail.com>
|
||||
Chris Tessum <ctessum@gmail.com>
|
||||
Dan Kortschak <dan.kortschak@adelaide.edu.au> <dan@kortschak.io>
|
||||
Daniel Fireman <danielfireman@gmail.com>
|
||||
David Samborski <bloggingarrow@gmail.com>
|
||||
Davor Kapsa <davor.kapsa@gmail.com>
|
||||
Egon Elbre <egonelbre@gmail.com>
|
||||
Ekaterina Efimova <katerina.efimova@gmail.com>
|
||||
Ethan Burns <burns.ethan@gmail.com>
|
||||
Evert Lammerts <evert.lammerts@gmail.com>
|
||||
Facundo Gaich <facugaich@gmail.com>
|
||||
Fazlul Shahriar <fshahriar@gmail.com>
|
||||
Francesc Campoy <campoy@golang.org>
|
||||
Gustaf Johansson <gustaf@pinon.se>
|
||||
Iakov Davydov <iakov.davydov@unil.ch>
|
||||
Jalem Raj Rohit <jrajrohit33@gmail.com>
|
||||
James Bell <james@stellentus.com>
|
||||
James Bowman <james.edward.bowman@gmail.com>
|
||||
James Holmes <32bitkid@gmail.com>
|
||||
Janne Snabb <snabb@epipe.com>
|
||||
Jeff Juozapaitis <jjjuozap@email.arizona.edu>
|
||||
Jeremy Atkinson <jchatkinson@gmail.com>
|
||||
Jonas Kahler <jonas@derkahler.de>
|
||||
Jonathan J Lawlor <jonathan.lawlor@gmail.com>
|
||||
Jonathan Schroeder <jd.schroeder@gmail.com>
|
||||
Joseph Watson <jtwatson@linux-consulting.us>
|
||||
Josh Wilson <josh.craig.wilson@gmail.com>
|
||||
Julien Roland <juroland@gmail.com>
|
||||
Kent English <kent.english@gmail.com>
|
||||
Kevin C. Zimmerman <kevinczimmerman@gmail.com>
|
||||
Konstantin Shaposhnikov <k.shaposhnikov@gmail.com>
|
||||
Leonid Kneller <recondite.matter@gmail.com>
|
||||
Lyron Winderbaum <lyron.winderbaum@student.adelaide.edu.au>
|
||||
Matthieu Di Mercurio <matthieu.dimercurio@gmail.com>
|
||||
Max Halford <maxhalford25@gmail.com>
|
||||
MinJae Kwon <k239507@gmail.com>
|
||||
Or Rikon <rikonor@gmail.com>
|
||||
Pontus Melke <pontusmelke@gmail.com>
|
||||
Renée French
|
||||
Robin Eklind <r.eklind.87@gmail.com>
|
||||
Samuel Kelemen <Samuel@Kelemen.us>
|
||||
Sam Zaydel <szaydel@gmail.com>
|
||||
Scott Holden <scott@sshconnection.com>
|
||||
Sebastien Binet <seb.binet@gmail.com>
|
||||
Shawn Smith <shawnpsmith@gmail.com>
|
||||
Spencer Lyon <spencerlyon2@gmail.com>
|
||||
Steve McCoy <mccoyst@gmail.com>
|
||||
Takeshi Yoneda <cz.rk.t0415y.g@gmail.com>
|
||||
Tobin Harding <me@tobin.cc>
|
||||
Vladimír Chalupecký <vladimir.chalupecky@gmail.com>
|
||||
Yevgeniy Vahlis <evahlis@gmail.com>
|
23
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/LICENSE
generated
vendored
Normal file
23
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/LICENSE
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
Copyright ©2013 The Gonum Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the gonum project nor the names of its authors and
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
47
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/README.md
generated
vendored
Normal file
47
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/README.md
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
# Gonum BLAS [](https://godoc.org/gonum.org/v1/gonum/blas)
|
||||
|
||||
A collection of packages to provide BLAS functionality for the [Go programming
|
||||
language](http://golang.org)
|
||||
|
||||
## Installation
|
||||
```sh
|
||||
go get gonum.org/v1/gonum/blas/...
|
||||
```
|
||||
|
||||
## Packages
|
||||
|
||||
### blas
|
||||
|
||||
Defines [BLAS API](http://www.netlib.org/blas/blast-forum/cinterface.pdf) split in several
|
||||
interfaces.
|
||||
|
||||
### blas/gonum
|
||||
|
||||
Go implementation of the BLAS API (incomplete, implements the `float32` and `float64` API).
|
||||
|
||||
### blas/blas64 and blas/blas32
|
||||
|
||||
Wrappers for an implementation of the double (i.e., `float64`) and single (`float32`)
|
||||
precision real parts of the BLAS API.
|
||||
|
||||
```Go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gonum.org/v1/gonum/blas/blas64"
|
||||
)
|
||||
|
||||
func main() {
|
||||
v := blas64.Vector{Inc: 1, Data: []float64{1, 1, 1}}
|
||||
fmt.Println("v has length:", blas64.Nrm2(len(v.Data), v))
|
||||
}
|
||||
```
|
||||
|
||||
### blas/cblas128 and blas/cblas64
|
||||
|
||||
Wrappers for an implementation of the double (i.e., `complex128`) and single (`complex64`)
|
||||
precision complex parts of the blas API.
|
||||
|
||||
Currently blas/cblas64 and blas/cblas128 require gonum.org/v1/netlib/blas.
|
287
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas.go
generated
vendored
Normal file
287
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas.go
generated
vendored
Normal file
@ -0,0 +1,287 @@
|
||||
// Copyright ©2013 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:generate ./conversions.bash
|
||||
|
||||
package blas
|
||||
|
||||
// Flag constants indicate Givens transformation H matrix state.
|
||||
type Flag int
|
||||
|
||||
const (
|
||||
Identity Flag = -2 // H is the identity matrix; no rotation is needed.
|
||||
Rescaling Flag = -1 // H specifies rescaling.
|
||||
OffDiagonal Flag = 0 // Off-diagonal elements of H are non-unit.
|
||||
Diagonal Flag = 1 // Diagonal elements of H are non-unit.
|
||||
)
|
||||
|
||||
// SrotmParams contains Givens transformation parameters returned
|
||||
// by the Float32 Srotm method.
|
||||
type SrotmParams struct {
|
||||
Flag
|
||||
H [4]float32 // Column-major 2 by 2 matrix.
|
||||
}
|
||||
|
||||
// DrotmParams contains Givens transformation parameters returned
|
||||
// by the Float64 Drotm method.
|
||||
type DrotmParams struct {
|
||||
Flag
|
||||
H [4]float64 // Column-major 2 by 2 matrix.
|
||||
}
|
||||
|
||||
// Transpose is used to specify the transposition operation for a
|
||||
// routine.
|
||||
type Transpose int
|
||||
|
||||
const (
|
||||
NoTrans Transpose = 111 + iota
|
||||
Trans
|
||||
ConjTrans
|
||||
)
|
||||
|
||||
// Uplo is used to specify whether the matrix is an upper or lower
|
||||
// triangular matrix.
|
||||
type Uplo int
|
||||
|
||||
const (
|
||||
All Uplo = 120 + iota
|
||||
Upper
|
||||
Lower
|
||||
)
|
||||
|
||||
// Diag is used to specify whether the matrix is a unit or non-unit
|
||||
// triangular matrix.
|
||||
type Diag int
|
||||
|
||||
const (
|
||||
NonUnit Diag = 131 + iota
|
||||
Unit
|
||||
)
|
||||
|
||||
// Side is used to specify from which side a multiplication operation
|
||||
// is performed.
|
||||
type Side int
|
||||
|
||||
const (
|
||||
Left Side = 141 + iota
|
||||
Right
|
||||
)
|
||||
|
||||
// Float32 implements the single precision real BLAS routines.
|
||||
type Float32 interface {
|
||||
Float32Level1
|
||||
Float32Level2
|
||||
Float32Level3
|
||||
}
|
||||
|
||||
// Float32Level1 implements the single precision real BLAS Level 1 routines.
|
||||
type Float32Level1 interface {
|
||||
Sdsdot(n int, alpha float32, x []float32, incX int, y []float32, incY int) float32
|
||||
Dsdot(n int, x []float32, incX int, y []float32, incY int) float64
|
||||
Sdot(n int, x []float32, incX int, y []float32, incY int) float32
|
||||
Snrm2(n int, x []float32, incX int) float32
|
||||
Sasum(n int, x []float32, incX int) float32
|
||||
Isamax(n int, x []float32, incX int) int
|
||||
Sswap(n int, x []float32, incX int, y []float32, incY int)
|
||||
Scopy(n int, x []float32, incX int, y []float32, incY int)
|
||||
Saxpy(n int, alpha float32, x []float32, incX int, y []float32, incY int)
|
||||
Srotg(a, b float32) (c, s, r, z float32)
|
||||
Srotmg(d1, d2, b1, b2 float32) (p SrotmParams, rd1, rd2, rb1 float32)
|
||||
Srot(n int, x []float32, incX int, y []float32, incY int, c, s float32)
|
||||
Srotm(n int, x []float32, incX int, y []float32, incY int, p SrotmParams)
|
||||
Sscal(n int, alpha float32, x []float32, incX int)
|
||||
}
|
||||
|
||||
// Float32Level2 implements the single precision real BLAS Level 2 routines.
|
||||
type Float32Level2 interface {
|
||||
Sgemv(tA Transpose, m, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int)
|
||||
Sgbmv(tA Transpose, m, n, kL, kU int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int)
|
||||
Strmv(ul Uplo, tA Transpose, d Diag, n int, a []float32, lda int, x []float32, incX int)
|
||||
Stbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []float32, lda int, x []float32, incX int)
|
||||
Stpmv(ul Uplo, tA Transpose, d Diag, n int, ap []float32, x []float32, incX int)
|
||||
Strsv(ul Uplo, tA Transpose, d Diag, n int, a []float32, lda int, x []float32, incX int)
|
||||
Stbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []float32, lda int, x []float32, incX int)
|
||||
Stpsv(ul Uplo, tA Transpose, d Diag, n int, ap []float32, x []float32, incX int)
|
||||
Ssymv(ul Uplo, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int)
|
||||
Ssbmv(ul Uplo, n, k int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int)
|
||||
Sspmv(ul Uplo, n int, alpha float32, ap []float32, x []float32, incX int, beta float32, y []float32, incY int)
|
||||
Sger(m, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int)
|
||||
Ssyr(ul Uplo, n int, alpha float32, x []float32, incX int, a []float32, lda int)
|
||||
Sspr(ul Uplo, n int, alpha float32, x []float32, incX int, ap []float32)
|
||||
Ssyr2(ul Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32, lda int)
|
||||
Sspr2(ul Uplo, n int, alpha float32, x []float32, incX int, y []float32, incY int, a []float32)
|
||||
}
|
||||
|
||||
// Float32Level3 implements the single precision real BLAS Level 3 routines.
|
||||
type Float32Level3 interface {
|
||||
Sgemm(tA, tB Transpose, m, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int)
|
||||
Ssymm(s Side, ul Uplo, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int)
|
||||
Ssyrk(ul Uplo, t Transpose, n, k int, alpha float32, a []float32, lda int, beta float32, c []float32, ldc int)
|
||||
Ssyr2k(ul Uplo, t Transpose, n, k int, alpha float32, a []float32, lda int, b []float32, ldb int, beta float32, c []float32, ldc int)
|
||||
Strmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int)
|
||||
Strsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float32, a []float32, lda int, b []float32, ldb int)
|
||||
}
|
||||
|
||||
// Float64 implements the single precision real BLAS routines.
|
||||
type Float64 interface {
|
||||
Float64Level1
|
||||
Float64Level2
|
||||
Float64Level3
|
||||
}
|
||||
|
||||
// Float64Level1 implements the double precision real BLAS Level 1 routines.
|
||||
type Float64Level1 interface {
|
||||
Ddot(n int, x []float64, incX int, y []float64, incY int) float64
|
||||
Dnrm2(n int, x []float64, incX int) float64
|
||||
Dasum(n int, x []float64, incX int) float64
|
||||
Idamax(n int, x []float64, incX int) int
|
||||
Dswap(n int, x []float64, incX int, y []float64, incY int)
|
||||
Dcopy(n int, x []float64, incX int, y []float64, incY int)
|
||||
Daxpy(n int, alpha float64, x []float64, incX int, y []float64, incY int)
|
||||
Drotg(a, b float64) (c, s, r, z float64)
|
||||
Drotmg(d1, d2, b1, b2 float64) (p DrotmParams, rd1, rd2, rb1 float64)
|
||||
Drot(n int, x []float64, incX int, y []float64, incY int, c float64, s float64)
|
||||
Drotm(n int, x []float64, incX int, y []float64, incY int, p DrotmParams)
|
||||
Dscal(n int, alpha float64, x []float64, incX int)
|
||||
}
|
||||
|
||||
// Float64Level2 implements the double precision real BLAS Level 2 routines.
|
||||
type Float64Level2 interface {
|
||||
Dgemv(tA Transpose, m, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int)
|
||||
Dgbmv(tA Transpose, m, n, kL, kU int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int)
|
||||
Dtrmv(ul Uplo, tA Transpose, d Diag, n int, a []float64, lda int, x []float64, incX int)
|
||||
Dtbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []float64, lda int, x []float64, incX int)
|
||||
Dtpmv(ul Uplo, tA Transpose, d Diag, n int, ap []float64, x []float64, incX int)
|
||||
Dtrsv(ul Uplo, tA Transpose, d Diag, n int, a []float64, lda int, x []float64, incX int)
|
||||
Dtbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []float64, lda int, x []float64, incX int)
|
||||
Dtpsv(ul Uplo, tA Transpose, d Diag, n int, ap []float64, x []float64, incX int)
|
||||
Dsymv(ul Uplo, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int)
|
||||
Dsbmv(ul Uplo, n, k int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int)
|
||||
Dspmv(ul Uplo, n int, alpha float64, ap []float64, x []float64, incX int, beta float64, y []float64, incY int)
|
||||
Dger(m, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int)
|
||||
Dsyr(ul Uplo, n int, alpha float64, x []float64, incX int, a []float64, lda int)
|
||||
Dspr(ul Uplo, n int, alpha float64, x []float64, incX int, ap []float64)
|
||||
Dsyr2(ul Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64, lda int)
|
||||
Dspr2(ul Uplo, n int, alpha float64, x []float64, incX int, y []float64, incY int, a []float64)
|
||||
}
|
||||
|
||||
// Float64Level3 implements the double precision real BLAS Level 3 routines.
|
||||
type Float64Level3 interface {
|
||||
Dgemm(tA, tB Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int)
|
||||
Dsymm(s Side, ul Uplo, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int)
|
||||
Dsyrk(ul Uplo, t Transpose, n, k int, alpha float64, a []float64, lda int, beta float64, c []float64, ldc int)
|
||||
Dsyr2k(ul Uplo, t Transpose, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int)
|
||||
Dtrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int)
|
||||
Dtrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha float64, a []float64, lda int, b []float64, ldb int)
|
||||
}
|
||||
|
||||
// Complex64 implements the single precision complex BLAS routines.
|
||||
type Complex64 interface {
|
||||
Complex64Level1
|
||||
Complex64Level2
|
||||
Complex64Level3
|
||||
}
|
||||
|
||||
// Complex64Level1 implements the single precision complex BLAS Level 1 routines.
|
||||
type Complex64Level1 interface {
|
||||
Cdotu(n int, x []complex64, incX int, y []complex64, incY int) (dotu complex64)
|
||||
Cdotc(n int, x []complex64, incX int, y []complex64, incY int) (dotc complex64)
|
||||
Scnrm2(n int, x []complex64, incX int) float32
|
||||
Scasum(n int, x []complex64, incX int) float32
|
||||
Icamax(n int, x []complex64, incX int) int
|
||||
Cswap(n int, x []complex64, incX int, y []complex64, incY int)
|
||||
Ccopy(n int, x []complex64, incX int, y []complex64, incY int)
|
||||
Caxpy(n int, alpha complex64, x []complex64, incX int, y []complex64, incY int)
|
||||
Cscal(n int, alpha complex64, x []complex64, incX int)
|
||||
Csscal(n int, alpha float32, x []complex64, incX int)
|
||||
}
|
||||
|
||||
// Complex64Level2 implements the single precision complex BLAS routines Level 2 routines.
|
||||
type Complex64Level2 interface {
|
||||
Cgemv(tA Transpose, m, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int)
|
||||
Cgbmv(tA Transpose, m, n, kL, kU int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int)
|
||||
Ctrmv(ul Uplo, tA Transpose, d Diag, n int, a []complex64, lda int, x []complex64, incX int)
|
||||
Ctbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex64, lda int, x []complex64, incX int)
|
||||
Ctpmv(ul Uplo, tA Transpose, d Diag, n int, ap []complex64, x []complex64, incX int)
|
||||
Ctrsv(ul Uplo, tA Transpose, d Diag, n int, a []complex64, lda int, x []complex64, incX int)
|
||||
Ctbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex64, lda int, x []complex64, incX int)
|
||||
Ctpsv(ul Uplo, tA Transpose, d Diag, n int, ap []complex64, x []complex64, incX int)
|
||||
Chemv(ul Uplo, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int)
|
||||
Chbmv(ul Uplo, n, k int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int)
|
||||
Chpmv(ul Uplo, n int, alpha complex64, ap []complex64, x []complex64, incX int, beta complex64, y []complex64, incY int)
|
||||
Cgeru(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int)
|
||||
Cgerc(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int)
|
||||
Cher(ul Uplo, n int, alpha float32, x []complex64, incX int, a []complex64, lda int)
|
||||
Chpr(ul Uplo, n int, alpha float32, x []complex64, incX int, a []complex64)
|
||||
Cher2(ul Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int)
|
||||
Chpr2(ul Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, ap []complex64)
|
||||
}
|
||||
|
||||
// Complex64Level3 implements the single precision complex BLAS Level 3 routines.
|
||||
type Complex64Level3 interface {
|
||||
Cgemm(tA, tB Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int)
|
||||
Csymm(s Side, ul Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int)
|
||||
Csyrk(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int)
|
||||
Csyr2k(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int)
|
||||
Ctrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int)
|
||||
Ctrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int)
|
||||
Chemm(s Side, ul Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int)
|
||||
Cherk(ul Uplo, t Transpose, n, k int, alpha float32, a []complex64, lda int, beta float32, c []complex64, ldc int)
|
||||
Cher2k(ul Uplo, t Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta float32, c []complex64, ldc int)
|
||||
}
|
||||
|
||||
// Complex128 implements the double precision complex BLAS routines.
|
||||
type Complex128 interface {
|
||||
Complex128Level1
|
||||
Complex128Level2
|
||||
Complex128Level3
|
||||
}
|
||||
|
||||
// Complex128Level1 implements the double precision complex BLAS Level 1 routines.
|
||||
type Complex128Level1 interface {
|
||||
Zdotu(n int, x []complex128, incX int, y []complex128, incY int) (dotu complex128)
|
||||
Zdotc(n int, x []complex128, incX int, y []complex128, incY int) (dotc complex128)
|
||||
Dznrm2(n int, x []complex128, incX int) float64
|
||||
Dzasum(n int, x []complex128, incX int) float64
|
||||
Izamax(n int, x []complex128, incX int) int
|
||||
Zswap(n int, x []complex128, incX int, y []complex128, incY int)
|
||||
Zcopy(n int, x []complex128, incX int, y []complex128, incY int)
|
||||
Zaxpy(n int, alpha complex128, x []complex128, incX int, y []complex128, incY int)
|
||||
Zscal(n int, alpha complex128, x []complex128, incX int)
|
||||
Zdscal(n int, alpha float64, x []complex128, incX int)
|
||||
}
|
||||
|
||||
// Complex128Level2 implements the double precision complex BLAS Level 2 routines.
|
||||
type Complex128Level2 interface {
|
||||
Zgemv(tA Transpose, m, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int)
|
||||
Zgbmv(tA Transpose, m, n int, kL int, kU int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int)
|
||||
Ztrmv(ul Uplo, tA Transpose, d Diag, n int, a []complex128, lda int, x []complex128, incX int)
|
||||
Ztbmv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex128, lda int, x []complex128, incX int)
|
||||
Ztpmv(ul Uplo, tA Transpose, d Diag, n int, ap []complex128, x []complex128, incX int)
|
||||
Ztrsv(ul Uplo, tA Transpose, d Diag, n int, a []complex128, lda int, x []complex128, incX int)
|
||||
Ztbsv(ul Uplo, tA Transpose, d Diag, n, k int, a []complex128, lda int, x []complex128, incX int)
|
||||
Ztpsv(ul Uplo, tA Transpose, d Diag, n int, ap []complex128, x []complex128, incX int)
|
||||
Zhemv(ul Uplo, n int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int)
|
||||
Zhbmv(ul Uplo, n, k int, alpha complex128, a []complex128, lda int, x []complex128, incX int, beta complex128, y []complex128, incY int)
|
||||
Zhpmv(ul Uplo, n int, alpha complex128, ap []complex128, x []complex128, incX int, beta complex128, y []complex128, incY int)
|
||||
Zgeru(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int)
|
||||
Zgerc(m, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int)
|
||||
Zher(ul Uplo, n int, alpha float64, x []complex128, incX int, a []complex128, lda int)
|
||||
Zhpr(ul Uplo, n int, alpha float64, x []complex128, incX int, a []complex128)
|
||||
Zher2(ul Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, a []complex128, lda int)
|
||||
Zhpr2(ul Uplo, n int, alpha complex128, x []complex128, incX int, y []complex128, incY int, ap []complex128)
|
||||
}
|
||||
|
||||
// Complex128Level3 implements the double precision complex BLAS Level 3 routines.
|
||||
type Complex128Level3 interface {
|
||||
Zgemm(tA, tB Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int)
|
||||
Zsymm(s Side, ul Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int)
|
||||
Zsyrk(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int)
|
||||
Zsyr2k(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int)
|
||||
Ztrmm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int)
|
||||
Ztrsm(s Side, ul Uplo, tA Transpose, d Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int)
|
||||
Zhemm(s Side, ul Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int)
|
||||
Zherk(ul Uplo, t Transpose, n, k int, alpha float64, a []complex128, lda int, beta float64, c []complex128, ldc int)
|
||||
Zher2k(ul Uplo, t Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta float64, c []complex128, ldc int)
|
||||
}
|
445
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/blas64.go
generated
vendored
Normal file
445
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/blas64.go
generated
vendored
Normal file
@ -0,0 +1,445 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package blas64
|
||||
|
||||
import (
|
||||
"gonum.org/v1/gonum/blas"
|
||||
"gonum.org/v1/gonum/blas/gonum"
|
||||
)
|
||||
|
||||
var blas64 blas.Float64 = gonum.Implementation{}
|
||||
|
||||
// Use sets the BLAS float64 implementation to be used by subsequent BLAS calls.
|
||||
// The default implementation is native.Implementation.
|
||||
func Use(b blas.Float64) {
|
||||
blas64 = b
|
||||
}
|
||||
|
||||
// Implementation returns the current BLAS float64 implementation.
|
||||
//
|
||||
// Implementation allows direct calls to the current the BLAS float64 implementation
|
||||
// giving finer control of parameters.
|
||||
func Implementation() blas.Float64 {
|
||||
return blas64
|
||||
}
|
||||
|
||||
// Vector represents a vector with an associated element increment.
|
||||
type Vector struct {
|
||||
Inc int
|
||||
Data []float64
|
||||
}
|
||||
|
||||
// General represents a matrix using the conventional storage scheme.
|
||||
type General struct {
|
||||
Rows, Cols int
|
||||
Stride int
|
||||
Data []float64
|
||||
}
|
||||
|
||||
// Band represents a band matrix using the band storage scheme.
|
||||
type Band struct {
|
||||
Rows, Cols int
|
||||
KL, KU int
|
||||
Stride int
|
||||
Data []float64
|
||||
}
|
||||
|
||||
// Triangular represents a triangular matrix using the conventional storage scheme.
|
||||
type Triangular struct {
|
||||
N int
|
||||
Stride int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
Diag blas.Diag
|
||||
}
|
||||
|
||||
// TriangularBand represents a triangular matrix using the band storage scheme.
|
||||
type TriangularBand struct {
|
||||
N, K int
|
||||
Stride int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
Diag blas.Diag
|
||||
}
|
||||
|
||||
// TriangularPacked represents a triangular matrix using the packed storage scheme.
|
||||
type TriangularPacked struct {
|
||||
N int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
Diag blas.Diag
|
||||
}
|
||||
|
||||
// Symmetric represents a symmetric matrix using the conventional storage scheme.
|
||||
type Symmetric struct {
|
||||
N int
|
||||
Stride int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
}
|
||||
|
||||
// SymmetricBand represents a symmetric matrix using the band storage scheme.
|
||||
type SymmetricBand struct {
|
||||
N, K int
|
||||
Stride int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
}
|
||||
|
||||
// SymmetricPacked represents a symmetric matrix using the packed storage scheme.
|
||||
type SymmetricPacked struct {
|
||||
N int
|
||||
Data []float64
|
||||
Uplo blas.Uplo
|
||||
}
|
||||
|
||||
// Level 1
|
||||
|
||||
const negInc = "blas64: negative vector increment"
|
||||
|
||||
// Dot computes the dot product of the two vectors:
|
||||
// \sum_i x[i]*y[i].
|
||||
func Dot(n int, x, y Vector) float64 {
|
||||
return blas64.Ddot(n, x.Data, x.Inc, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Nrm2 computes the Euclidean norm of the vector x:
|
||||
// sqrt(\sum_i x[i]*x[i]).
|
||||
//
|
||||
// Nrm2 will panic if the vector increment is negative.
|
||||
func Nrm2(n int, x Vector) float64 {
|
||||
if x.Inc < 0 {
|
||||
panic(negInc)
|
||||
}
|
||||
return blas64.Dnrm2(n, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Asum computes the sum of the absolute values of the elements of x:
|
||||
// \sum_i |x[i]|.
|
||||
//
|
||||
// Asum will panic if the vector increment is negative.
|
||||
func Asum(n int, x Vector) float64 {
|
||||
if x.Inc < 0 {
|
||||
panic(negInc)
|
||||
}
|
||||
return blas64.Dasum(n, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Iamax returns the index of an element of x with the largest absolute value.
|
||||
// If there are multiple such indices the earliest is returned.
|
||||
// Iamax returns -1 if n == 0.
|
||||
//
|
||||
// Iamax will panic if the vector increment is negative.
|
||||
func Iamax(n int, x Vector) int {
|
||||
if x.Inc < 0 {
|
||||
panic(negInc)
|
||||
}
|
||||
return blas64.Idamax(n, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Swap exchanges the elements of the two vectors:
|
||||
// x[i], y[i] = y[i], x[i] for all i.
|
||||
func Swap(n int, x, y Vector) {
|
||||
blas64.Dswap(n, x.Data, x.Inc, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Copy copies the elements of x into the elements of y:
|
||||
// y[i] = x[i] for all i.
|
||||
func Copy(n int, x, y Vector) {
|
||||
blas64.Dcopy(n, x.Data, x.Inc, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Axpy adds x scaled by alpha to y:
|
||||
// y[i] += alpha*x[i] for all i.
|
||||
func Axpy(n int, alpha float64, x, y Vector) {
|
||||
blas64.Daxpy(n, alpha, x.Data, x.Inc, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Rotg computes the parameters of a Givens plane rotation so that
|
||||
// ⎡ c s⎤ ⎡a⎤ ⎡r⎤
|
||||
// ⎣-s c⎦ * ⎣b⎦ = ⎣0⎦
|
||||
// where a and b are the Cartesian coordinates of a given point.
|
||||
// c, s, and r are defined as
|
||||
// r = ±Sqrt(a^2 + b^2),
|
||||
// c = a/r, the cosine of the rotation angle,
|
||||
// s = a/r, the sine of the rotation angle,
|
||||
// and z is defined such that
|
||||
// if |a| > |b|, z = s,
|
||||
// otherwise if c != 0, z = 1/c,
|
||||
// otherwise z = 1.
|
||||
func Rotg(a, b float64) (c, s, r, z float64) {
|
||||
return blas64.Drotg(a, b)
|
||||
}
|
||||
|
||||
// Rotmg computes the modified Givens rotation. See
|
||||
// http://www.netlib.org/lapack/explore-html/df/deb/drotmg_8f.html
|
||||
// for more details.
|
||||
func Rotmg(d1, d2, b1, b2 float64) (p blas.DrotmParams, rd1, rd2, rb1 float64) {
|
||||
return blas64.Drotmg(d1, d2, b1, b2)
|
||||
}
|
||||
|
||||
// Rot applies a plane transformation to n points represented by the vectors x
|
||||
// and y:
|
||||
// x[i] = c*x[i] + s*y[i],
|
||||
// y[i] = -s*x[i] + c*y[i], for all i.
|
||||
func Rot(n int, x, y Vector, c, s float64) {
|
||||
blas64.Drot(n, x.Data, x.Inc, y.Data, y.Inc, c, s)
|
||||
}
|
||||
|
||||
// Rotm applies the modified Givens rotation to n points represented by the
|
||||
// vectors x and y.
|
||||
func Rotm(n int, x, y Vector, p blas.DrotmParams) {
|
||||
blas64.Drotm(n, x.Data, x.Inc, y.Data, y.Inc, p)
|
||||
}
|
||||
|
||||
// Scal scales the vector x by alpha:
|
||||
// x[i] *= alpha for all i.
|
||||
//
|
||||
// Scal will panic if the vector increment is negative.
|
||||
func Scal(n int, alpha float64, x Vector) {
|
||||
if x.Inc < 0 {
|
||||
panic(negInc)
|
||||
}
|
||||
blas64.Dscal(n, alpha, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Level 2
|
||||
|
||||
// Gemv computes
|
||||
// y = alpha * A * x + beta * y, if t == blas.NoTrans,
|
||||
// y = alpha * A^T * x + beta * y, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
|
||||
func Gemv(t blas.Transpose, alpha float64, a General, x Vector, beta float64, y Vector) {
|
||||
blas64.Dgemv(t, a.Rows, a.Cols, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Gbmv computes
|
||||
// y = alpha * A * x + beta * y, if t == blas.NoTrans,
|
||||
// y = alpha * A^T * x + beta * y, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an m×n band matrix, x and y are vectors, and alpha and beta are scalars.
|
||||
func Gbmv(t blas.Transpose, alpha float64, a Band, x Vector, beta float64, y Vector) {
|
||||
blas64.Dgbmv(t, a.Rows, a.Cols, a.KL, a.KU, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Trmv computes
|
||||
// x = A * x, if t == blas.NoTrans,
|
||||
// x = A^T * x, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular matrix, and x is a vector.
|
||||
func Trmv(t blas.Transpose, a Triangular, x Vector) {
|
||||
blas64.Dtrmv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Tbmv computes
|
||||
// x = A * x, if t == blas.NoTrans,
|
||||
// x = A^T * x, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular band matrix, and x is a vector.
|
||||
func Tbmv(t blas.Transpose, a TriangularBand, x Vector) {
|
||||
blas64.Dtbmv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Tpmv computes
|
||||
// x = A * x, if t == blas.NoTrans,
|
||||
// x = A^T * x, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular matrix in packed format, and x is a vector.
|
||||
func Tpmv(t blas.Transpose, a TriangularPacked, x Vector) {
|
||||
blas64.Dtpmv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Trsv solves
|
||||
// A * x = b, if t == blas.NoTrans,
|
||||
// A^T * x = b, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular matrix, and x and b are vectors.
|
||||
//
|
||||
// At entry to the function, x contains the values of b, and the result is
|
||||
// stored in-place into x.
|
||||
//
|
||||
// No test for singularity or near-singularity is included in this
|
||||
// routine. Such tests must be performed before calling this routine.
|
||||
func Trsv(t blas.Transpose, a Triangular, x Vector) {
|
||||
blas64.Dtrsv(a.Uplo, t, a.Diag, a.N, a.Data, a.Stride, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Tbsv solves
|
||||
// A * x = b, if t == blas.NoTrans,
|
||||
// A^T * x = b, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular band matrix, and x and b are vectors.
|
||||
//
|
||||
// At entry to the function, x contains the values of b, and the result is
|
||||
// stored in place into x.
|
||||
//
|
||||
// No test for singularity or near-singularity is included in this
|
||||
// routine. Such tests must be performed before calling this routine.
|
||||
func Tbsv(t blas.Transpose, a TriangularBand, x Vector) {
|
||||
blas64.Dtbsv(a.Uplo, t, a.Diag, a.N, a.K, a.Data, a.Stride, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Tpsv solves
|
||||
// A * x = b, if t == blas.NoTrans,
|
||||
// A^T * x = b, if t == blas.Trans or blas.ConjTrans,
|
||||
// where A is an n×n triangular matrix in packed format, and x and b are
|
||||
// vectors.
|
||||
//
|
||||
// At entry to the function, x contains the values of b, and the result is
|
||||
// stored in place into x.
|
||||
//
|
||||
// No test for singularity or near-singularity is included in this
|
||||
// routine. Such tests must be performed before calling this routine.
|
||||
func Tpsv(t blas.Transpose, a TriangularPacked, x Vector) {
|
||||
blas64.Dtpsv(a.Uplo, t, a.Diag, a.N, a.Data, x.Data, x.Inc)
|
||||
}
|
||||
|
||||
// Symv computes
|
||||
// y = alpha * A * x + beta * y,
|
||||
// where A is an n×n symmetric matrix, x and y are vectors, and alpha and
|
||||
// beta are scalars.
|
||||
func Symv(alpha float64, a Symmetric, x Vector, beta float64, y Vector) {
|
||||
blas64.Dsymv(a.Uplo, a.N, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Sbmv performs
|
||||
// y = alpha * A * x + beta * y,
|
||||
// where A is an n×n symmetric band matrix, x and y are vectors, and alpha
|
||||
// and beta are scalars.
|
||||
func Sbmv(alpha float64, a SymmetricBand, x Vector, beta float64, y Vector) {
|
||||
blas64.Dsbmv(a.Uplo, a.N, a.K, alpha, a.Data, a.Stride, x.Data, x.Inc, beta, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Spmv performs
|
||||
// y = alpha * A * x + beta * y,
|
||||
// where A is an n×n symmetric matrix in packed format, x and y are vectors,
|
||||
// and alpha and beta are scalars.
|
||||
func Spmv(alpha float64, a SymmetricPacked, x Vector, beta float64, y Vector) {
|
||||
blas64.Dspmv(a.Uplo, a.N, alpha, a.Data, x.Data, x.Inc, beta, y.Data, y.Inc)
|
||||
}
|
||||
|
||||
// Ger performs a rank-1 update
|
||||
// A += alpha * x * y^T,
|
||||
// where A is an m×n dense matrix, x and y are vectors, and alpha is a scalar.
|
||||
func Ger(alpha float64, x, y Vector, a General) {
|
||||
blas64.Dger(a.Rows, a.Cols, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride)
|
||||
}
|
||||
|
||||
// Syr performs a rank-1 update
|
||||
// A += alpha * x * x^T,
|
||||
// where A is an n×n symmetric matrix, x is a vector, and alpha is a scalar.
|
||||
func Syr(alpha float64, x Vector, a Symmetric) {
|
||||
blas64.Dsyr(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data, a.Stride)
|
||||
}
|
||||
|
||||
// Spr performs the rank-1 update
|
||||
// A += alpha * x * x^T,
|
||||
// where A is an n×n symmetric matrix in packed format, x is a vector, and
|
||||
// alpha is a scalar.
|
||||
func Spr(alpha float64, x Vector, a SymmetricPacked) {
|
||||
blas64.Dspr(a.Uplo, a.N, alpha, x.Data, x.Inc, a.Data)
|
||||
}
|
||||
|
||||
// Syr2 performs a rank-2 update
|
||||
// A += alpha * x * y^T + alpha * y * x^T,
|
||||
// where A is a symmetric n×n matrix, x and y are vectors, and alpha is a scalar.
|
||||
func Syr2(alpha float64, x, y Vector, a Symmetric) {
|
||||
blas64.Dsyr2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data, a.Stride)
|
||||
}
|
||||
|
||||
// Spr2 performs a rank-2 update
|
||||
// A += alpha * x * y^T + alpha * y * x^T,
|
||||
// where A is an n×n symmetric matrix in packed format, x and y are vectors,
|
||||
// and alpha is a scalar.
|
||||
func Spr2(alpha float64, x, y Vector, a SymmetricPacked) {
|
||||
blas64.Dspr2(a.Uplo, a.N, alpha, x.Data, x.Inc, y.Data, y.Inc, a.Data)
|
||||
}
|
||||
|
||||
// Level 3
|
||||
|
||||
// Gemm computes
|
||||
// C = alpha * A * B + beta * C,
|
||||
// where A, B, and C are dense matrices, and alpha and beta are scalars.
|
||||
// tA and tB specify whether A or B are transposed.
|
||||
func Gemm(tA, tB blas.Transpose, alpha float64, a, b General, beta float64, c General) {
|
||||
var m, n, k int
|
||||
if tA == blas.NoTrans {
|
||||
m, k = a.Rows, a.Cols
|
||||
} else {
|
||||
m, k = a.Cols, a.Rows
|
||||
}
|
||||
if tB == blas.NoTrans {
|
||||
n = b.Cols
|
||||
} else {
|
||||
n = b.Rows
|
||||
}
|
||||
blas64.Dgemm(tA, tB, m, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride)
|
||||
}
|
||||
|
||||
// Symm performs
|
||||
// C = alpha * A * B + beta * C, if s == blas.Left,
|
||||
// C = alpha * B * A + beta * C, if s == blas.Right,
|
||||
// where A is an n×n or m×m symmetric matrix, B and C are m×n matrices, and
|
||||
// alpha is a scalar.
|
||||
func Symm(s blas.Side, alpha float64, a Symmetric, b General, beta float64, c General) {
|
||||
var m, n int
|
||||
if s == blas.Left {
|
||||
m, n = a.N, b.Cols
|
||||
} else {
|
||||
m, n = b.Rows, a.N
|
||||
}
|
||||
blas64.Dsymm(s, a.Uplo, m, n, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride)
|
||||
}
|
||||
|
||||
// Syrk performs a symmetric rank-k update
|
||||
// C = alpha * A * A^T + beta * C, if t == blas.NoTrans,
|
||||
// C = alpha * A^T * A + beta * C, if t == blas.Trans or blas.ConjTrans,
|
||||
// where C is an n×n symmetric matrix, A is an n×k matrix if t == blas.NoTrans and
|
||||
// a k×n matrix otherwise, and alpha and beta are scalars.
|
||||
func Syrk(t blas.Transpose, alpha float64, a General, beta float64, c Symmetric) {
|
||||
var n, k int
|
||||
if t == blas.NoTrans {
|
||||
n, k = a.Rows, a.Cols
|
||||
} else {
|
||||
n, k = a.Cols, a.Rows
|
||||
}
|
||||
blas64.Dsyrk(c.Uplo, t, n, k, alpha, a.Data, a.Stride, beta, c.Data, c.Stride)
|
||||
}
|
||||
|
||||
// Syr2k performs a symmetric rank-2k update
|
||||
// C = alpha * A * B^T + alpha * B * A^T + beta * C, if t == blas.NoTrans,
|
||||
// C = alpha * A^T * B + alpha * B^T * A + beta * C, if t == blas.Trans or blas.ConjTrans,
|
||||
// where C is an n×n symmetric matrix, A and B are n×k matrices if t == NoTrans
|
||||
// and k×n matrices otherwise, and alpha and beta are scalars.
|
||||
func Syr2k(t blas.Transpose, alpha float64, a, b General, beta float64, c Symmetric) {
|
||||
var n, k int
|
||||
if t == blas.NoTrans {
|
||||
n, k = a.Rows, a.Cols
|
||||
} else {
|
||||
n, k = a.Cols, a.Rows
|
||||
}
|
||||
blas64.Dsyr2k(c.Uplo, t, n, k, alpha, a.Data, a.Stride, b.Data, b.Stride, beta, c.Data, c.Stride)
|
||||
}
|
||||
|
||||
// Trmm performs
|
||||
// B = alpha * A * B, if tA == blas.NoTrans and s == blas.Left,
|
||||
// B = alpha * A^T * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Left,
|
||||
// B = alpha * B * A, if tA == blas.NoTrans and s == blas.Right,
|
||||
// B = alpha * B * A^T, if tA == blas.Trans or blas.ConjTrans, and s == blas.Right,
|
||||
// where A is an n×n or m×m triangular matrix, B is an m×n matrix, and alpha is
|
||||
// a scalar.
|
||||
func Trmm(s blas.Side, tA blas.Transpose, alpha float64, a Triangular, b General) {
|
||||
blas64.Dtrmm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride)
|
||||
}
|
||||
|
||||
// Trsm solves
|
||||
// A * X = alpha * B, if tA == blas.NoTrans and s == blas.Left,
|
||||
// A^T * X = alpha * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Left,
|
||||
// X * A = alpha * B, if tA == blas.NoTrans and s == blas.Right,
|
||||
// X * A^T = alpha * B, if tA == blas.Trans or blas.ConjTrans, and s == blas.Right,
|
||||
// where A is an n×n or m×m triangular matrix, X and B are m×n matrices, and
|
||||
// alpha is a scalar.
|
||||
//
|
||||
// At entry to the function, X contains the values of B, and the result is
|
||||
// stored in-place into X.
|
||||
//
|
||||
// No check is made that A is invertible.
|
||||
func Trsm(s blas.Side, tA blas.Transpose, alpha float64, a Triangular, b General) {
|
||||
blas64.Dtrsm(s, a.Uplo, tA, a.Diag, b.Rows, b.Cols, alpha, a.Data, a.Stride, b.Data, b.Stride)
|
||||
}
|
277
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/conv.go
generated
vendored
Normal file
277
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/conv.go
generated
vendored
Normal file
@ -0,0 +1,277 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package blas64
|
||||
|
||||
import "gonum.org/v1/gonum/blas"
|
||||
|
||||
// GeneralCols represents a matrix using the conventional column-major storage scheme.
|
||||
type GeneralCols General
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions as a and have adequate backing
|
||||
// data storage.
|
||||
func (t GeneralCols) From(a General) {
|
||||
if t.Rows != a.Rows || t.Cols != a.Cols {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if len(t.Data) < (t.Cols-1)*t.Stride+t.Rows {
|
||||
panic("blas64: short data slice")
|
||||
}
|
||||
for i := 0; i < a.Rows; i++ {
|
||||
for j, v := range a.Data[i*a.Stride : i*a.Stride+a.Cols] {
|
||||
t.Data[i+j*t.Stride] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions as a and have adequate backing
|
||||
// data storage.
|
||||
func (t General) From(a GeneralCols) {
|
||||
if t.Rows != a.Rows || t.Cols != a.Cols {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if len(t.Data) < (t.Rows-1)*t.Stride+t.Cols {
|
||||
panic("blas64: short data slice")
|
||||
}
|
||||
for j := 0; j < a.Cols; j++ {
|
||||
for i, v := range a.Data[j*a.Stride : j*a.Stride+a.Rows] {
|
||||
t.Data[i*t.Stride+j] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TriangularCols represents a matrix using the conventional column-major storage scheme.
|
||||
type TriangularCols Triangular
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, uplo and diag as a and have
|
||||
// adequate backing data storage.
|
||||
func (t TriangularCols) From(a Triangular) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
if t.Diag != a.Diag {
|
||||
panic("blas64: mismatched BLAS diag")
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := i; j < a.N; j++ {
|
||||
t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
|
||||
}
|
||||
}
|
||||
case blas.Lower:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j <= i; j++ {
|
||||
t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
|
||||
}
|
||||
}
|
||||
case blas.All:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j < a.N; j++ {
|
||||
t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, uplo and diag as a and have
|
||||
// adequate backing data storage.
|
||||
func (t Triangular) From(a TriangularCols) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
if t.Diag != a.Diag {
|
||||
panic("blas64: mismatched BLAS diag")
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := i; j < a.N; j++ {
|
||||
t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
|
||||
}
|
||||
}
|
||||
case blas.Lower:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j <= i; j++ {
|
||||
t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
|
||||
}
|
||||
}
|
||||
case blas.All:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j < a.N; j++ {
|
||||
t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// BandCols represents a matrix using the band column-major storage scheme.
|
||||
type BandCols Band
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions and bandwidth as a and have
|
||||
// adequate backing data storage.
|
||||
func (t BandCols) From(a Band) {
|
||||
if t.Rows != a.Rows || t.Cols != a.Cols {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.KL != a.KL || t.KU != a.KU {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.KL+a.KU+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.KL+t.KU+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
for i := 0; i < a.Rows; i++ {
|
||||
for j := max(0, i-a.KL); j < min(i+a.KU+1, a.Cols); j++ {
|
||||
t.Data[i+t.KU-j+j*t.Stride] = a.Data[j+a.KL-i+i*a.Stride]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions and bandwidth as a and have
|
||||
// adequate backing data storage.
|
||||
func (t Band) From(a BandCols) {
|
||||
if t.Rows != a.Rows || t.Cols != a.Cols {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.KL != a.KL || t.KU != a.KU {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.KL+a.KU+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.KL+t.KU+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
for j := 0; j < a.Cols; j++ {
|
||||
for i := max(0, j-a.KU); i < min(j+a.KL+1, a.Rows); i++ {
|
||||
t.Data[j+a.KL-i+i*a.Stride] = a.Data[i+t.KU-j+j*t.Stride]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TriangularBandCols represents a symmetric matrix using the band column-major storage scheme.
|
||||
type TriangularBandCols TriangularBand
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, bandwidth and uplo as a and
|
||||
// have adequate backing data storage.
|
||||
func (t TriangularBandCols) From(a TriangularBand) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.K != a.K {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.K+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.K+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
if t.Diag != a.Diag {
|
||||
panic("blas64: mismatched BLAS diag")
|
||||
}
|
||||
dst := BandCols{
|
||||
Rows: t.N, Cols: t.N,
|
||||
Stride: t.Stride,
|
||||
Data: t.Data,
|
||||
}
|
||||
src := Band{
|
||||
Rows: a.N, Cols: a.N,
|
||||
Stride: a.Stride,
|
||||
Data: a.Data,
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
dst.KU = t.K
|
||||
src.KU = a.K
|
||||
case blas.Lower:
|
||||
dst.KL = t.K
|
||||
src.KL = a.K
|
||||
}
|
||||
dst.From(src)
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, bandwidth and uplo as a and
|
||||
// have adequate backing data storage.
|
||||
func (t TriangularBand) From(a TriangularBandCols) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.K != a.K {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.K+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.K+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
if t.Diag != a.Diag {
|
||||
panic("blas64: mismatched BLAS diag")
|
||||
}
|
||||
dst := Band{
|
||||
Rows: t.N, Cols: t.N,
|
||||
Stride: t.Stride,
|
||||
Data: t.Data,
|
||||
}
|
||||
src := BandCols{
|
||||
Rows: a.N, Cols: a.N,
|
||||
Stride: a.Stride,
|
||||
Data: a.Data,
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
dst.KU = t.K
|
||||
src.KU = a.K
|
||||
case blas.Lower:
|
||||
dst.KL = t.K
|
||||
src.KL = a.K
|
||||
}
|
||||
dst.From(src)
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
153
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/conv_symmetric.go
generated
vendored
Normal file
153
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/conv_symmetric.go
generated
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package blas64
|
||||
|
||||
import "gonum.org/v1/gonum/blas"
|
||||
|
||||
// SymmetricCols represents a matrix using the conventional column-major storage scheme.
|
||||
type SymmetricCols Symmetric
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions and uplo as a and have adequate
|
||||
// backing data storage.
|
||||
func (t SymmetricCols) From(a Symmetric) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := i; j < a.N; j++ {
|
||||
t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
|
||||
}
|
||||
}
|
||||
case blas.Lower:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j <= i; j++ {
|
||||
t.Data[i+j*t.Stride] = a.Data[i*a.Stride+j]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions and uplo as a and have adequate
|
||||
// backing data storage.
|
||||
func (t Symmetric) From(a SymmetricCols) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := i; j < a.N; j++ {
|
||||
t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
|
||||
}
|
||||
}
|
||||
case blas.Lower:
|
||||
for i := 0; i < a.N; i++ {
|
||||
for j := 0; j <= i; j++ {
|
||||
t.Data[i*t.Stride+j] = a.Data[i+j*a.Stride]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SymmetricBandCols represents a symmetric matrix using the band column-major storage scheme.
|
||||
type SymmetricBandCols SymmetricBand
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, bandwidth and uplo as a and
|
||||
// have adequate backing data storage.
|
||||
func (t SymmetricBandCols) From(a SymmetricBand) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.K != a.K {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.K+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.K+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
dst := BandCols{
|
||||
Rows: t.N, Cols: t.N,
|
||||
Stride: t.Stride,
|
||||
Data: t.Data,
|
||||
}
|
||||
src := Band{
|
||||
Rows: a.N, Cols: a.N,
|
||||
Stride: a.Stride,
|
||||
Data: a.Data,
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
dst.KU = t.K
|
||||
src.KU = a.K
|
||||
case blas.Lower:
|
||||
dst.KL = t.K
|
||||
src.KL = a.K
|
||||
}
|
||||
dst.From(src)
|
||||
}
|
||||
|
||||
// From fills the receiver with elements from a. The receiver
|
||||
// must have the same dimensions, bandwidth and uplo as a and
|
||||
// have adequate backing data storage.
|
||||
func (t SymmetricBand) From(a SymmetricBandCols) {
|
||||
if t.N != a.N {
|
||||
panic("blas64: mismatched dimension")
|
||||
}
|
||||
if t.K != a.K {
|
||||
panic("blas64: mismatched bandwidth")
|
||||
}
|
||||
if a.Stride < a.K+1 {
|
||||
panic("blas64: short stride for source")
|
||||
}
|
||||
if t.Stride < t.K+1 {
|
||||
panic("blas64: short stride for destination")
|
||||
}
|
||||
if t.Uplo != a.Uplo {
|
||||
panic("blas64: mismatched BLAS uplo")
|
||||
}
|
||||
dst := Band{
|
||||
Rows: t.N, Cols: t.N,
|
||||
Stride: t.Stride,
|
||||
Data: t.Data,
|
||||
}
|
||||
src := BandCols{
|
||||
Rows: a.N, Cols: a.N,
|
||||
Stride: a.Stride,
|
||||
Data: a.Data,
|
||||
}
|
||||
switch a.Uplo {
|
||||
default:
|
||||
panic("blas64: bad BLAS uplo")
|
||||
case blas.Upper:
|
||||
dst.KU = t.K
|
||||
src.KU = a.K
|
||||
case blas.Lower:
|
||||
dst.KL = t.K
|
||||
src.KL = a.K
|
||||
}
|
||||
dst.From(src)
|
||||
}
|
6
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/doc.go
generated
vendored
Normal file
6
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/blas64/doc.go
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
// Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package blas64 provides a simple interface to the float64 BLAS API.
|
||||
package blas64
|
159
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/conversions.bash
generated
vendored
Executable file
159
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/conversions.bash
generated
vendored
Executable file
@ -0,0 +1,159 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style
|
||||
# license that can be found in the LICENSE file.
|
||||
|
||||
# Generate code for blas32.
|
||||
echo Generating blas32/conv.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv.go
|
||||
cat blas64/conv.go \
|
||||
| gofmt -r 'float64 -> float32' \
|
||||
\
|
||||
| sed -e 's/blas64/blas32/' \
|
||||
\
|
||||
>> blas32/conv.go
|
||||
|
||||
echo Generating blas32/conv_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_test.go
|
||||
cat blas64/conv_test.go \
|
||||
| gofmt -r 'float64 -> float32' \
|
||||
\
|
||||
| sed -e 's/blas64/blas32/' \
|
||||
-e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \
|
||||
\
|
||||
>> blas32/conv_test.go
|
||||
|
||||
echo Generating blas32/conv_symmetric.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric.go
|
||||
cat blas64/conv_symmetric.go \
|
||||
| gofmt -r 'float64 -> float32' \
|
||||
\
|
||||
| sed -e 's/blas64/blas32/' \
|
||||
\
|
||||
>> blas32/conv_symmetric.go
|
||||
|
||||
echo Generating blas32/conv_symmetric_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > blas32/conv_symmetric_test.go
|
||||
cat blas64/conv_symmetric_test.go \
|
||||
| gofmt -r 'float64 -> float32' \
|
||||
\
|
||||
| sed -e 's/blas64/blas32/' \
|
||||
-e 's_"math"_math "gonum.org/v1/gonum/internal/math32"_' \
|
||||
\
|
||||
>> blas32/conv_symmetric_test.go
|
||||
|
||||
|
||||
# Generate code for cblas128.
|
||||
echo Generating cblas128/conv.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv.go
|
||||
cat blas64/conv.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
\
|
||||
>> cblas128/conv.go
|
||||
|
||||
echo Generating cblas128/conv_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_test.go
|
||||
cat blas64/conv_test.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
-e 's_"math"_math "math/cmplx"_' \
|
||||
\
|
||||
>> cblas128/conv_test.go
|
||||
|
||||
echo Generating cblas128/conv_symmetric.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric.go
|
||||
cat blas64/conv_symmetric.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
\
|
||||
>> cblas128/conv_symmetric.go
|
||||
|
||||
echo Generating cblas128/conv_symmetric_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_symmetric_test.go
|
||||
cat blas64/conv_symmetric_test.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
-e 's_"math"_math "math/cmplx"_' \
|
||||
\
|
||||
>> cblas128/conv_symmetric_test.go
|
||||
|
||||
echo Generating cblas128/conv_hermitian.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian.go
|
||||
cat blas64/conv_symmetric.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
-e 's/Symmetric/Hermitian/g' \
|
||||
-e 's/a symmetric/an Hermitian/g' \
|
||||
-e 's/symmetric/hermitian/g' \
|
||||
-e 's/Sym/Herm/g' \
|
||||
\
|
||||
>> cblas128/conv_hermitian.go
|
||||
|
||||
echo Generating cblas128/conv_hermitian_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas128/conv_hermitian_test.go
|
||||
cat blas64/conv_symmetric_test.go \
|
||||
| gofmt -r 'float64 -> complex128' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas128/' \
|
||||
-e 's/Symmetric/Hermitian/g' \
|
||||
-e 's/a symmetric/an Hermitian/g' \
|
||||
-e 's/symmetric/hermitian/g' \
|
||||
-e 's/Sym/Herm/g' \
|
||||
-e 's_"math"_math "math/cmplx"_' \
|
||||
\
|
||||
>> cblas128/conv_hermitian_test.go
|
||||
|
||||
|
||||
# Generate code for cblas64.
|
||||
echo Generating cblas64/conv.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv.go
|
||||
cat blas64/conv.go \
|
||||
| gofmt -r 'float64 -> complex64' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas64/' \
|
||||
\
|
||||
>> cblas64/conv.go
|
||||
|
||||
echo Generating cblas64/conv_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_test.go
|
||||
cat blas64/conv_test.go \
|
||||
| gofmt -r 'float64 -> complex64' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas64/' \
|
||||
-e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \
|
||||
\
|
||||
>> cblas64/conv_test.go
|
||||
|
||||
echo Generating cblas64/conv_hermitian.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian.go
|
||||
cat blas64/conv_symmetric.go \
|
||||
| gofmt -r 'float64 -> complex64' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas64/' \
|
||||
-e 's/Symmetric/Hermitian/g' \
|
||||
-e 's/a symmetric/an Hermitian/g' \
|
||||
-e 's/symmetric/hermitian/g' \
|
||||
-e 's/Sym/Herm/g' \
|
||||
\
|
||||
>> cblas64/conv_hermitian.go
|
||||
|
||||
echo Generating cblas64/conv_hermitian_test.go
|
||||
echo -e '// Code generated by "go generate gonum.org/v1/gonum/blas”; DO NOT EDIT.\n' > cblas64/conv_hermitian_test.go
|
||||
cat blas64/conv_symmetric_test.go \
|
||||
| gofmt -r 'float64 -> complex64' \
|
||||
\
|
||||
| sed -e 's/blas64/cblas64/' \
|
||||
-e 's/Symmetric/Hermitian/g' \
|
||||
-e 's/a symmetric/an Hermitian/g' \
|
||||
-e 's/symmetric/hermitian/g' \
|
||||
-e 's/Sym/Herm/g' \
|
||||
-e 's_"math"_math "gonum.org/v1/gonum/internal/cmplx64"_' \
|
||||
\
|
||||
>> cblas64/conv_hermitian_test.go
|
108
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/doc.go
generated
vendored
Normal file
108
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/doc.go
generated
vendored
Normal file
@ -0,0 +1,108 @@
|
||||
// Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package blas provides interfaces for the BLAS linear algebra standard.
|
||||
|
||||
All methods must perform appropriate parameter checking and panic if
|
||||
provided parameters that do not conform to the requirements specified
|
||||
by the BLAS standard.
|
||||
|
||||
Quick Reference Guide to the BLAS from http://www.netlib.org/lapack/lug/node145.html
|
||||
|
||||
This version is modified to remove the "order" option. All matrix operations are
|
||||
on row-order matrices.
|
||||
|
||||
Level 1 BLAS
|
||||
|
||||
dim scalar vector vector scalars 5-element prefixes
|
||||
struct
|
||||
|
||||
_rotg ( a, b ) S, D
|
||||
_rotmg( d1, d2, a, b ) S, D
|
||||
_rot ( n, x, incX, y, incY, c, s ) S, D
|
||||
_rotm ( n, x, incX, y, incY, param ) S, D
|
||||
_swap ( n, x, incX, y, incY ) S, D, C, Z
|
||||
_scal ( n, alpha, x, incX ) S, D, C, Z, Cs, Zd
|
||||
_copy ( n, x, incX, y, incY ) S, D, C, Z
|
||||
_axpy ( n, alpha, x, incX, y, incY ) S, D, C, Z
|
||||
_dot ( n, x, incX, y, incY ) S, D, Ds
|
||||
_dotu ( n, x, incX, y, incY ) C, Z
|
||||
_dotc ( n, x, incX, y, incY ) C, Z
|
||||
__dot ( n, alpha, x, incX, y, incY ) Sds
|
||||
_nrm2 ( n, x, incX ) S, D, Sc, Dz
|
||||
_asum ( n, x, incX ) S, D, Sc, Dz
|
||||
I_amax( n, x, incX ) s, d, c, z
|
||||
|
||||
Level 2 BLAS
|
||||
|
||||
options dim b-width scalar matrix vector scalar vector prefixes
|
||||
|
||||
_gemv ( trans, m, n, alpha, a, lda, x, incX, beta, y, incY ) S, D, C, Z
|
||||
_gbmv ( trans, m, n, kL, kU, alpha, a, lda, x, incX, beta, y, incY ) S, D, C, Z
|
||||
_hemv ( uplo, n, alpha, a, lda, x, incX, beta, y, incY ) C, Z
|
||||
_hbmv ( uplo, n, k, alpha, a, lda, x, incX, beta, y, incY ) C, Z
|
||||
_hpmv ( uplo, n, alpha, ap, x, incX, beta, y, incY ) C, Z
|
||||
_symv ( uplo, n, alpha, a, lda, x, incX, beta, y, incY ) S, D
|
||||
_sbmv ( uplo, n, k, alpha, a, lda, x, incX, beta, y, incY ) S, D
|
||||
_spmv ( uplo, n, alpha, ap, x, incX, beta, y, incY ) S, D
|
||||
_trmv ( uplo, trans, diag, n, a, lda, x, incX ) S, D, C, Z
|
||||
_tbmv ( uplo, trans, diag, n, k, a, lda, x, incX ) S, D, C, Z
|
||||
_tpmv ( uplo, trans, diag, n, ap, x, incX ) S, D, C, Z
|
||||
_trsv ( uplo, trans, diag, n, a, lda, x, incX ) S, D, C, Z
|
||||
_tbsv ( uplo, trans, diag, n, k, a, lda, x, incX ) S, D, C, Z
|
||||
_tpsv ( uplo, trans, diag, n, ap, x, incX ) S, D, C, Z
|
||||
|
||||
options dim scalar vector vector matrix prefixes
|
||||
|
||||
_ger ( m, n, alpha, x, incX, y, incY, a, lda ) S, D
|
||||
_geru ( m, n, alpha, x, incX, y, incY, a, lda ) C, Z
|
||||
_gerc ( m, n, alpha, x, incX, y, incY, a, lda ) C, Z
|
||||
_her ( uplo, n, alpha, x, incX, a, lda ) C, Z
|
||||
_hpr ( uplo, n, alpha, x, incX, ap ) C, Z
|
||||
_her2 ( uplo, n, alpha, x, incX, y, incY, a, lda ) C, Z
|
||||
_hpr2 ( uplo, n, alpha, x, incX, y, incY, ap ) C, Z
|
||||
_syr ( uplo, n, alpha, x, incX, a, lda ) S, D
|
||||
_spr ( uplo, n, alpha, x, incX, ap ) S, D
|
||||
_syr2 ( uplo, n, alpha, x, incX, y, incY, a, lda ) S, D
|
||||
_spr2 ( uplo, n, alpha, x, incX, y, incY, ap ) S, D
|
||||
|
||||
Level 3 BLAS
|
||||
|
||||
options dim scalar matrix matrix scalar matrix prefixes
|
||||
|
||||
_gemm ( transA, transB, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z
|
||||
_symm ( side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z
|
||||
_hemm ( side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc ) C, Z
|
||||
_syrk ( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) S, D, C, Z
|
||||
_herk ( uplo, trans, n, k, alpha, a, lda, beta, c, ldc ) C, Z
|
||||
_syr2k( uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) S, D, C, Z
|
||||
_her2k( uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc ) C, Z
|
||||
_trmm ( side, uplo, transA, diag, m, n, alpha, a, lda, b, ldb ) S, D, C, Z
|
||||
_trsm ( side, uplo, transA, diag, m, n, alpha, a, lda, b, ldb ) S, D, C, Z
|
||||
|
||||
Meaning of prefixes
|
||||
|
||||
S - float32 C - complex64
|
||||
D - float64 Z - complex128
|
||||
|
||||
Matrix types
|
||||
|
||||
GE - GEneral GB - General Band
|
||||
SY - SYmmetric SB - Symmetric Band SP - Symmetric Packed
|
||||
HE - HErmitian HB - Hermitian Band HP - Hermitian Packed
|
||||
TR - TRiangular TB - Triangular Band TP - Triangular Packed
|
||||
|
||||
Options
|
||||
|
||||
trans = NoTrans, Trans, ConjTrans
|
||||
uplo = Upper, Lower
|
||||
diag = Nonunit, Unit
|
||||
side = Left, Right (A or op(A) on the left, or A or op(A) on the right)
|
||||
|
||||
For real matrices, Trans and ConjTrans have the same meaning.
|
||||
For Hermitian matrices, trans = Trans is not allowed.
|
||||
For complex symmetric matrices, trans = ConjTrans is not allowed.
|
||||
*/
|
||||
package blas
|
164
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/cmplx.go
generated
vendored
Normal file
164
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/cmplx.go
generated
vendored
Normal file
@ -0,0 +1,164 @@
|
||||
// Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import "gonum.org/v1/gonum/blas"
|
||||
|
||||
var (
|
||||
_ blas.Complex64 = Implementation{}
|
||||
_ blas.Complex128 = Implementation{}
|
||||
)
|
||||
|
||||
// TODO(btracey): Replace this as complex routines are added, and instead
|
||||
// automatically generate the complex64 routines from the complex128 ones.
|
||||
|
||||
var noComplex = "native: implementation does not implement this routine, see the cgo wrapper in gonum.org/v1/netlib/blas"
|
||||
|
||||
// Level 1 complex64 routines.
|
||||
|
||||
func (Implementation) Cdotu(n int, x []complex64, incX int, y []complex64, incY int) (dotu complex64) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cdotc(n int, x []complex64, incX int, y []complex64, incY int) (dotc complex64) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Scnrm2(n int, x []complex64, incX int) float32 {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Scasum(n int, x []complex64, incX int) float32 {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Icamax(n int, x []complex64, incX int) int {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cswap(n int, x []complex64, incX int, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ccopy(n int, x []complex64, incX int, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Caxpy(n int, alpha complex64, x []complex64, incX int, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cscal(n int, alpha complex64, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Csscal(n int, alpha float32, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
|
||||
// Level 2 complex64 routines.
|
||||
|
||||
func (Implementation) Cgemv(tA blas.Transpose, m, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cgbmv(tA blas.Transpose, m, n, kL, kU int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctrmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []complex64, lda int, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctbmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []complex64, lda int, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctpmv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []complex64, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctrsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, a []complex64, lda int, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctbsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n, k int, a []complex64, lda int, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctpsv(ul blas.Uplo, tA blas.Transpose, d blas.Diag, n int, ap []complex64, x []complex64, incX int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chemv(ul blas.Uplo, n int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chbmv(ul blas.Uplo, n, k int, alpha complex64, a []complex64, lda int, x []complex64, incX int, beta complex64, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chpmv(ul blas.Uplo, n int, alpha complex64, ap []complex64, x []complex64, incX int, beta complex64, y []complex64, incY int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cgeru(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cgerc(m, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cher(ul blas.Uplo, n int, alpha float32, x []complex64, incX int, a []complex64, lda int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chpr(ul blas.Uplo, n int, alpha float32, x []complex64, incX int, a []complex64) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cher2(ul blas.Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, a []complex64, lda int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chpr2(ul blas.Uplo, n int, alpha complex64, x []complex64, incX int, y []complex64, incY int, ap []complex64) {
|
||||
panic(noComplex)
|
||||
}
|
||||
|
||||
// Level 3 complex64 routines.
|
||||
|
||||
func (Implementation) Cgemm(tA, tB blas.Transpose, m, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Csymm(s blas.Side, ul blas.Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Csyrk(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, beta complex64, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Csyr2k(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctrmm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ctrsm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Chemm(s blas.Side, ul blas.Uplo, m, n int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta complex64, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cherk(ul blas.Uplo, t blas.Transpose, n, k int, alpha float32, a []complex64, lda int, beta float32, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Cher2k(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex64, a []complex64, lda int, b []complex64, ldb int, beta float32, c []complex64, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
|
||||
// Level 3 complex128 routines.
|
||||
|
||||
func (Implementation) Zgemm(tA, tB blas.Transpose, m, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zsymm(s blas.Side, ul blas.Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zsyrk(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, beta complex128, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zsyr2k(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ztrmm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Ztrsm(s blas.Side, ul blas.Uplo, tA blas.Transpose, d blas.Diag, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zhemm(s blas.Side, ul blas.Uplo, m, n int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta complex128, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zherk(ul blas.Uplo, t blas.Transpose, n, k int, alpha float64, a []complex128, lda int, beta float64, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
||||
func (Implementation) Zher2k(ul blas.Uplo, t blas.Transpose, n, k int, alpha complex128, a []complex128, lda int, b []complex128, ldb int, beta float64, c []complex128, ldc int) {
|
||||
panic(noComplex)
|
||||
}
|
265
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/dgemm.go
generated
vendored
Normal file
265
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/dgemm.go
generated
vendored
Normal file
@ -0,0 +1,265 @@
|
||||
// Copyright ©2014 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"gonum.org/v1/gonum/blas"
|
||||
"gonum.org/v1/gonum/internal/asm/f64"
|
||||
)
|
||||
|
||||
// Dgemm performs one of the matrix-matrix operations
|
||||
// C = alpha * A * B + beta * C
|
||||
// C = alpha * A^T * B + beta * C
|
||||
// C = alpha * A * B^T + beta * C
|
||||
// C = alpha * A^T * B^T + beta * C
|
||||
// where A is an m×k or k×m dense matrix, B is an n×k or k×n dense matrix, C is
|
||||
// an m×n matrix, and alpha and beta are scalars. tA and tB specify whether A or
|
||||
// B are transposed.
|
||||
func (Implementation) Dgemm(tA, tB blas.Transpose, m, n, k int, alpha float64, a []float64, lda int, b []float64, ldb int, beta float64, c []float64, ldc int) {
|
||||
if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans {
|
||||
panic(badTranspose)
|
||||
}
|
||||
if tB != blas.NoTrans && tB != blas.Trans && tB != blas.ConjTrans {
|
||||
panic(badTranspose)
|
||||
}
|
||||
aTrans := tA == blas.Trans || tA == blas.ConjTrans
|
||||
if aTrans {
|
||||
checkDMatrix('a', k, m, a, lda)
|
||||
} else {
|
||||
checkDMatrix('a', m, k, a, lda)
|
||||
}
|
||||
bTrans := tB == blas.Trans || tB == blas.ConjTrans
|
||||
if bTrans {
|
||||
checkDMatrix('b', n, k, b, ldb)
|
||||
} else {
|
||||
checkDMatrix('b', k, n, b, ldb)
|
||||
}
|
||||
checkDMatrix('c', m, n, c, ldc)
|
||||
|
||||
// scale c
|
||||
if beta != 1 {
|
||||
if beta == 0 {
|
||||
for i := 0; i < m; i++ {
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
for j := range ctmp {
|
||||
ctmp[j] = 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for i := 0; i < m; i++ {
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
for j := range ctmp {
|
||||
ctmp[j] *= beta
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dgemmParallel(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
}
|
||||
|
||||
func dgemmParallel(aTrans, bTrans bool, m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
// dgemmParallel computes a parallel matrix multiplication by partitioning
|
||||
// a and b into sub-blocks, and updating c with the multiplication of the sub-block
|
||||
// In all cases,
|
||||
// A = [ A_11 A_12 ... A_1j
|
||||
// A_21 A_22 ... A_2j
|
||||
// ...
|
||||
// A_i1 A_i2 ... A_ij]
|
||||
//
|
||||
// and same for B. All of the submatrix sizes are blockSize×blockSize except
|
||||
// at the edges.
|
||||
//
|
||||
// In all cases, there is one dimension for each matrix along which
|
||||
// C must be updated sequentially.
|
||||
// Cij = \sum_k Aik Bki, (A * B)
|
||||
// Cij = \sum_k Aki Bkj, (A^T * B)
|
||||
// Cij = \sum_k Aik Bjk, (A * B^T)
|
||||
// Cij = \sum_k Aki Bjk, (A^T * B^T)
|
||||
//
|
||||
// This code computes one {i, j} block sequentially along the k dimension,
|
||||
// and computes all of the {i, j} blocks concurrently. This
|
||||
// partitioning allows Cij to be updated in-place without race-conditions.
|
||||
// Instead of launching a goroutine for each possible concurrent computation,
|
||||
// a number of worker goroutines are created and channels are used to pass
|
||||
// available and completed cases.
|
||||
//
|
||||
// http://alexkr.com/docs/matrixmult.pdf is a good reference on matrix-matrix
|
||||
// multiplies, though this code does not copy matrices to attempt to eliminate
|
||||
// cache misses.
|
||||
|
||||
maxKLen := k
|
||||
parBlocks := blocks(m, blockSize) * blocks(n, blockSize)
|
||||
if parBlocks < minParBlock {
|
||||
// The matrix multiplication is small in the dimensions where it can be
|
||||
// computed concurrently. Just do it in serial.
|
||||
dgemmSerial(aTrans, bTrans, m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
return
|
||||
}
|
||||
|
||||
nWorkers := runtime.GOMAXPROCS(0)
|
||||
if parBlocks < nWorkers {
|
||||
nWorkers = parBlocks
|
||||
}
|
||||
// There is a tradeoff between the workers having to wait for work
|
||||
// and a large buffer making operations slow.
|
||||
buf := buffMul * nWorkers
|
||||
if buf > parBlocks {
|
||||
buf = parBlocks
|
||||
}
|
||||
|
||||
sendChan := make(chan subMul, buf)
|
||||
|
||||
// Launch workers. A worker receives an {i, j} submatrix of c, and computes
|
||||
// A_ik B_ki (or the transposed version) storing the result in c_ij. When the
|
||||
// channel is finally closed, it signals to the waitgroup that it has finished
|
||||
// computing.
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < nWorkers; i++ {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
// Make local copies of otherwise global variables to reduce shared memory.
|
||||
// This has a noticeable effect on benchmarks in some cases.
|
||||
alpha := alpha
|
||||
aTrans := aTrans
|
||||
bTrans := bTrans
|
||||
m := m
|
||||
n := n
|
||||
for sub := range sendChan {
|
||||
i := sub.i
|
||||
j := sub.j
|
||||
leni := blockSize
|
||||
if i+leni > m {
|
||||
leni = m - i
|
||||
}
|
||||
lenj := blockSize
|
||||
if j+lenj > n {
|
||||
lenj = n - j
|
||||
}
|
||||
|
||||
cSub := sliceView64(c, ldc, i, j, leni, lenj)
|
||||
|
||||
// Compute A_ik B_kj for all k
|
||||
for k := 0; k < maxKLen; k += blockSize {
|
||||
lenk := blockSize
|
||||
if k+lenk > maxKLen {
|
||||
lenk = maxKLen - k
|
||||
}
|
||||
var aSub, bSub []float64
|
||||
if aTrans {
|
||||
aSub = sliceView64(a, lda, k, i, lenk, leni)
|
||||
} else {
|
||||
aSub = sliceView64(a, lda, i, k, leni, lenk)
|
||||
}
|
||||
if bTrans {
|
||||
bSub = sliceView64(b, ldb, j, k, lenj, lenk)
|
||||
} else {
|
||||
bSub = sliceView64(b, ldb, k, j, lenk, lenj)
|
||||
}
|
||||
dgemmSerial(aTrans, bTrans, leni, lenj, lenk, aSub, lda, bSub, ldb, cSub, ldc, alpha)
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
// Send out all of the {i, j} subblocks for computation.
|
||||
for i := 0; i < m; i += blockSize {
|
||||
for j := 0; j < n; j += blockSize {
|
||||
sendChan <- subMul{
|
||||
i: i,
|
||||
j: j,
|
||||
}
|
||||
}
|
||||
}
|
||||
close(sendChan)
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
// dgemmSerial is serial matrix multiply
|
||||
func dgemmSerial(aTrans, bTrans bool, m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
switch {
|
||||
case !aTrans && !bTrans:
|
||||
dgemmSerialNotNot(m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
return
|
||||
case aTrans && !bTrans:
|
||||
dgemmSerialTransNot(m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
return
|
||||
case !aTrans && bTrans:
|
||||
dgemmSerialNotTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
return
|
||||
case aTrans && bTrans:
|
||||
dgemmSerialTransTrans(m, n, k, a, lda, b, ldb, c, ldc, alpha)
|
||||
return
|
||||
default:
|
||||
panic("unreachable")
|
||||
}
|
||||
}
|
||||
|
||||
// dgemmSerial where neither a nor b are transposed
|
||||
func dgemmSerialNotNot(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
// This style is used instead of the literal [i*stride +j]) is used because
|
||||
// approximately 5 times faster as of go 1.3.
|
||||
for i := 0; i < m; i++ {
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
for l, v := range a[i*lda : i*lda+k] {
|
||||
tmp := alpha * v
|
||||
if tmp != 0 {
|
||||
f64.AxpyUnitaryTo(ctmp, tmp, b[l*ldb:l*ldb+n], ctmp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dgemmSerial where neither a is transposed and b is not
|
||||
func dgemmSerialTransNot(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
// This style is used instead of the literal [i*stride +j]) is used because
|
||||
// approximately 5 times faster as of go 1.3.
|
||||
for l := 0; l < k; l++ {
|
||||
btmp := b[l*ldb : l*ldb+n]
|
||||
for i, v := range a[l*lda : l*lda+m] {
|
||||
tmp := alpha * v
|
||||
if tmp != 0 {
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
f64.AxpyUnitaryTo(ctmp, tmp, btmp, ctmp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dgemmSerial where neither a is not transposed and b is
|
||||
func dgemmSerialNotTrans(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
// This style is used instead of the literal [i*stride +j]) is used because
|
||||
// approximately 5 times faster as of go 1.3.
|
||||
for i := 0; i < m; i++ {
|
||||
atmp := a[i*lda : i*lda+k]
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
for j := 0; j < n; j++ {
|
||||
ctmp[j] += alpha * f64.DotUnitary(atmp, b[j*ldb:j*ldb+k])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// dgemmSerial where both are transposed
|
||||
func dgemmSerialTransTrans(m, n, k int, a []float64, lda int, b []float64, ldb int, c []float64, ldc int, alpha float64) {
|
||||
// This style is used instead of the literal [i*stride +j]) is used because
|
||||
// approximately 5 times faster as of go 1.3.
|
||||
for l := 0; l < k; l++ {
|
||||
for i, v := range a[l*lda : l*lda+m] {
|
||||
tmp := alpha * v
|
||||
if tmp != 0 {
|
||||
ctmp := c[i*ldc : i*ldc+n]
|
||||
f64.AxpyInc(tmp, b[l:], ctmp, uintptr(n), uintptr(ldb), 1, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func sliceView64(a []float64, lda, i, j, r, c int) []float64 {
|
||||
return a[i*lda+j : (i+r-1)*lda+j+c]
|
||||
}
|
88
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/doc.go
generated
vendored
Normal file
88
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/doc.go
generated
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Ensure changes made to blas/native are reflected in blas/cgo where relevant.
|
||||
|
||||
/*
|
||||
Package gonum is a Go implementation of the BLAS API. This implementation
|
||||
panics when the input arguments are invalid as per the standard, for example
|
||||
if a vector increment is zero. Note that the treatment of NaN values
|
||||
is not specified, and differs among the BLAS implementations.
|
||||
gonum.org/v1/gonum/blas/blas64 provides helpful wrapper functions to the BLAS
|
||||
interface. The rest of this text describes the layout of the data for the input types.
|
||||
|
||||
Note that in the function documentation, x[i] refers to the i^th element
|
||||
of the vector, which will be different from the i^th element of the slice if
|
||||
incX != 1.
|
||||
|
||||
See http://www.netlib.org/lapack/explore-html/d4/de1/_l_i_c_e_n_s_e_source.html
|
||||
for more license information.
|
||||
|
||||
Vector arguments are effectively strided slices. They have two input arguments,
|
||||
a number of elements, n, and an increment, incX. The increment specifies the
|
||||
distance between elements of the vector. The actual Go slice may be longer
|
||||
than necessary.
|
||||
The increment may be positive or negative, except in functions with only
|
||||
a single vector argument where the increment may only be positive. If the increment
|
||||
is negative, s[0] is the last element in the slice. Note that this is not the same
|
||||
as counting backward from the end of the slice, as len(s) may be longer than
|
||||
necessary. So, for example, if n = 5 and incX = 3, the elements of s are
|
||||
[0 * * 1 * * 2 * * 3 * * 4 * * * ...]
|
||||
where ∗ elements are never accessed. If incX = -3, the same elements are
|
||||
accessed, just in reverse order (4, 3, 2, 1, 0).
|
||||
|
||||
Dense matrices are specified by a number of rows, a number of columns, and a stride.
|
||||
The stride specifies the number of entries in the slice between the first element
|
||||
of successive rows. The stride must be at least as large as the number of columns
|
||||
but may be longer.
|
||||
[a00 ... a0n a0* ... a1stride-1 a21 ... amn am* ... amstride-1]
|
||||
Thus, dense[i*ld + j] refers to the {i, j}th element of the matrix.
|
||||
|
||||
Symmetric and triangular matrices (non-packed) are stored identically to Dense,
|
||||
except that only elements in one triangle of the matrix are accessed.
|
||||
|
||||
Packed symmetric and packed triangular matrices are laid out with the entries
|
||||
condensed such that all of the unreferenced elements are removed. So, the upper triangular
|
||||
matrix
|
||||
[
|
||||
1 2 3
|
||||
0 4 5
|
||||
0 0 6
|
||||
]
|
||||
and the lower-triangular matrix
|
||||
[
|
||||
1 0 0
|
||||
2 3 0
|
||||
4 5 6
|
||||
]
|
||||
will both be compacted as [1 2 3 4 5 6]. The (i, j) element of the original
|
||||
dense matrix can be found at element i*n - (i-1)*i/2 + j for upper triangular,
|
||||
and at element i * (i+1) /2 + j for lower triangular.
|
||||
|
||||
Banded matrices are laid out in a compact format, constructed by removing the
|
||||
zeros in the rows and aligning the diagonals. For example, the matrix
|
||||
[
|
||||
1 2 3 0 0 0
|
||||
4 5 6 7 0 0
|
||||
0 8 9 10 11 0
|
||||
0 0 12 13 14 15
|
||||
0 0 0 16 17 18
|
||||
0 0 0 0 19 20
|
||||
]
|
||||
|
||||
implicitly becomes (∗ entries are never accessed)
|
||||
[
|
||||
* 1 2 3
|
||||
4 5 6 7
|
||||
8 9 10 11
|
||||
12 13 14 15
|
||||
16 17 18 *
|
||||
19 20 * *
|
||||
]
|
||||
which is given to the BLAS routine as [∗ 1 2 3 4 ...].
|
||||
|
||||
See http://www.crest.iu.edu/research/mtl/reference/html/banded.html
|
||||
for more information
|
||||
*/
|
||||
package gonum
|
180
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/gemv.go
generated
vendored
Normal file
180
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/gemv.go
generated
vendored
Normal file
@ -0,0 +1,180 @@
|
||||
// Copyright ©2018 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import (
|
||||
"gonum.org/v1/gonum/blas"
|
||||
"gonum.org/v1/gonum/internal/asm/f32"
|
||||
"gonum.org/v1/gonum/internal/asm/f64"
|
||||
)
|
||||
|
||||
// TODO(Kunde21): Merge these methods back into level2double/level2single when Sgemv assembly kernels are merged into f32.
|
||||
|
||||
// Dgemv computes
|
||||
// y = alpha * A * x + beta * y if tA = blas.NoTrans
|
||||
// y = alpha * A^T * x + beta * y if tA = blas.Trans or blas.ConjTrans
|
||||
// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
|
||||
func (Implementation) Dgemv(tA blas.Transpose, m, n int, alpha float64, a []float64, lda int, x []float64, incX int, beta float64, y []float64, incY int) {
|
||||
if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans {
|
||||
panic(badTranspose)
|
||||
}
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if lda < max(1, n) {
|
||||
panic(badLdA)
|
||||
}
|
||||
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
// Set up indexes
|
||||
lenX := m
|
||||
lenY := n
|
||||
if tA == blas.NoTrans {
|
||||
lenX = n
|
||||
lenY = m
|
||||
}
|
||||
if (incX > 0 && (lenX-1)*incX >= len(x)) || (incX < 0 && (1-lenX)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (lenY-1)*incY >= len(y)) || (incY < 0 && (1-lenY)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if lda*(m-1)+n > len(a) || lda < max(1, n) {
|
||||
panic(badLdA)
|
||||
}
|
||||
|
||||
// Quick return if possible
|
||||
if m == 0 || n == 0 || (alpha == 0 && beta == 1) {
|
||||
return
|
||||
}
|
||||
|
||||
if alpha == 0 {
|
||||
// First form y = beta * y
|
||||
if incY > 0 {
|
||||
Implementation{}.Dscal(lenY, beta, y, incY)
|
||||
} else {
|
||||
Implementation{}.Dscal(lenY, beta, y, -incY)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Form y = alpha * A * x + y
|
||||
if tA == blas.NoTrans {
|
||||
f64.GemvN(uintptr(m), uintptr(n), alpha, a, uintptr(lda), x, uintptr(incX), beta, y, uintptr(incY))
|
||||
return
|
||||
}
|
||||
// Cases where a is transposed.
|
||||
f64.GemvT(uintptr(m), uintptr(n), alpha, a, uintptr(lda), x, uintptr(incX), beta, y, uintptr(incY))
|
||||
}
|
||||
|
||||
// Sgemv computes
|
||||
// y = alpha * A * x + beta * y if tA = blas.NoTrans
|
||||
// y = alpha * A^T * x + beta * y if tA = blas.Trans or blas.ConjTrans
|
||||
// where A is an m×n dense matrix, x and y are vectors, and alpha and beta are scalars.
|
||||
//
|
||||
// Float32 implementations are autogenerated and not directly tested.
|
||||
func (Implementation) Sgemv(tA blas.Transpose, m, n int, alpha float32, a []float32, lda int, x []float32, incX int, beta float32, y []float32, incY int) {
|
||||
if tA != blas.NoTrans && tA != blas.Trans && tA != blas.ConjTrans {
|
||||
panic(badTranspose)
|
||||
}
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if lda < max(1, n) {
|
||||
panic(badLdA)
|
||||
}
|
||||
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
// Set up indexes
|
||||
lenX := m
|
||||
lenY := n
|
||||
if tA == blas.NoTrans {
|
||||
lenX = n
|
||||
lenY = m
|
||||
}
|
||||
if (incX > 0 && (lenX-1)*incX >= len(x)) || (incX < 0 && (1-lenX)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (lenY-1)*incY >= len(y)) || (incY < 0 && (1-lenY)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if lda*(m-1)+n > len(a) || lda < max(1, n) {
|
||||
panic(badLdA)
|
||||
}
|
||||
|
||||
// Quick return if possible
|
||||
if m == 0 || n == 0 || (alpha == 0 && beta == 1) {
|
||||
return
|
||||
}
|
||||
|
||||
var kx, ky int
|
||||
if incX < 0 {
|
||||
kx = -(lenX - 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
ky = -(lenY - 1) * incY
|
||||
}
|
||||
|
||||
// First form y = beta * y
|
||||
if incY > 0 {
|
||||
Implementation{}.Sscal(lenY, beta, y, incY)
|
||||
} else {
|
||||
Implementation{}.Sscal(lenY, beta, y, -incY)
|
||||
}
|
||||
|
||||
if alpha == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// Form y = alpha * A * x + y
|
||||
if tA == blas.NoTrans {
|
||||
if incX == 1 && incY == 1 {
|
||||
for i := 0; i < m; i++ {
|
||||
y[i] += alpha * f32.DotUnitary(a[lda*i:lda*i+n], x)
|
||||
}
|
||||
return
|
||||
}
|
||||
iy := ky
|
||||
for i := 0; i < m; i++ {
|
||||
y[iy] += alpha * f32.DotInc(x, a[lda*i:lda*i+n], uintptr(n), uintptr(incX), 1, uintptr(kx), 0)
|
||||
iy += incY
|
||||
}
|
||||
return
|
||||
}
|
||||
// Cases where a is transposed.
|
||||
if incX == 1 && incY == 1 {
|
||||
for i := 0; i < m; i++ {
|
||||
tmp := alpha * x[i]
|
||||
if tmp != 0 {
|
||||
f32.AxpyUnitaryTo(y, tmp, a[lda*i:lda*i+n], y)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
ix := kx
|
||||
for i := 0; i < m; i++ {
|
||||
tmp := alpha * x[ix]
|
||||
if tmp != 0 {
|
||||
f32.AxpyInc(tmp, a[lda*i:lda*i+n], y, uintptr(n), 1, uintptr(incY), 0, uintptr(ky))
|
||||
}
|
||||
ix += incX
|
||||
}
|
||||
}
|
182
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/gonum.go
generated
vendored
Normal file
182
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/gonum.go
generated
vendored
Normal file
@ -0,0 +1,182 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:generate ./single_precision.bash
|
||||
|
||||
package gonum
|
||||
|
||||
import "math"
|
||||
|
||||
type Implementation struct{}
|
||||
|
||||
// The following are panic strings used during parameter checks.
|
||||
const (
|
||||
zeroIncX = "blas: zero x index increment"
|
||||
zeroIncY = "blas: zero y index increment"
|
||||
|
||||
mLT0 = "blas: m < 0"
|
||||
nLT0 = "blas: n < 0"
|
||||
kLT0 = "blas: k < 0"
|
||||
kLLT0 = "blas: kL < 0"
|
||||
kULT0 = "blas: kU < 0"
|
||||
|
||||
badUplo = "blas: illegal triangle"
|
||||
badTranspose = "blas: illegal transpose"
|
||||
badDiag = "blas: illegal diagonal"
|
||||
badSide = "blas: illegal side"
|
||||
|
||||
badLdA = "blas: bad leading dimension of A"
|
||||
badLdB = "blas: bad leading dimension of B"
|
||||
badLdC = "blas: bad leading dimension of C"
|
||||
|
||||
badX = "blas: bad length of x"
|
||||
badY = "blas: bad length of y"
|
||||
)
|
||||
|
||||
// [SD]gemm behavior constants. These are kept here to keep them out of the
|
||||
// way during single precision code genration.
|
||||
const (
|
||||
blockSize = 64 // b x b matrix
|
||||
minParBlock = 4 // minimum number of blocks needed to go parallel
|
||||
buffMul = 4 // how big is the buffer relative to the number of workers
|
||||
)
|
||||
|
||||
// subMul is a common type shared by [SD]gemm.
|
||||
type subMul struct {
|
||||
i, j int // index of block
|
||||
}
|
||||
|
||||
func max(a, b int) int {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func min(a, b int) int {
|
||||
if a > b {
|
||||
return b
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func checkSMatrix(name byte, m, n int, a []float32, lda int) {
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if lda < n {
|
||||
panic("blas: illegal stride of " + string(name))
|
||||
}
|
||||
if len(a) < (m-1)*lda+n {
|
||||
panic("blas: index of " + string(name) + " out of range")
|
||||
}
|
||||
}
|
||||
|
||||
func checkDMatrix(name byte, m, n int, a []float64, lda int) {
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if lda < n {
|
||||
panic("blas: illegal stride of " + string(name))
|
||||
}
|
||||
if len(a) < (m-1)*lda+n {
|
||||
panic("blas: index of " + string(name) + " out of range")
|
||||
}
|
||||
}
|
||||
|
||||
func checkZMatrix(name byte, m, n int, a []complex128, lda int) {
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if lda < max(1, n) {
|
||||
panic("blas: illegal stride of " + string(name))
|
||||
}
|
||||
if len(a) < (m-1)*lda+n {
|
||||
panic("blas: insufficient " + string(name) + " matrix slice length")
|
||||
}
|
||||
}
|
||||
|
||||
func checkZBandMatrix(name byte, m, n, kL, kU int, ab []complex128, ldab int) {
|
||||
if m < 0 {
|
||||
panic(mLT0)
|
||||
}
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if kL < 0 {
|
||||
panic(kLLT0)
|
||||
}
|
||||
if kU < 0 {
|
||||
panic(kULT0)
|
||||
}
|
||||
if ldab < kL+kU+1 {
|
||||
panic("blas: illegal stride of band matrix " + string(name))
|
||||
}
|
||||
nRow := min(m, n+kL)
|
||||
if len(ab) < (nRow-1)*ldab+kL+1+kU {
|
||||
panic("blas: insufficient " + string(name) + " band matrix slice length")
|
||||
}
|
||||
}
|
||||
|
||||
func checkZhbMatrix(name byte, n, k int, ab []complex128, ldab int) {
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if k < 0 {
|
||||
panic(kLT0)
|
||||
}
|
||||
if ldab < k+1 {
|
||||
panic("blas: illegal stride of Hermitian band matrix " + string(name))
|
||||
}
|
||||
if len(ab) < (n-1)*ldab+k+1 {
|
||||
panic("blas: insufficient " + string(name) + " Hermitian band matrix slice length")
|
||||
}
|
||||
}
|
||||
|
||||
func checkZtbMatrix(name byte, n, k int, ab []complex128, ldab int) {
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if k < 0 {
|
||||
panic(kLT0)
|
||||
}
|
||||
if ldab < k+1 {
|
||||
panic("blas: illegal stride of triangular band matrix " + string(name))
|
||||
}
|
||||
if len(ab) < (n-1)*ldab+k+1 {
|
||||
panic("blas: insufficient " + string(name) + " triangular band matrix slice length")
|
||||
}
|
||||
}
|
||||
|
||||
func checkZVector(name byte, n int, x []complex128, incX int) {
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic("blas: insufficient " + string(name) + " vector slice length")
|
||||
}
|
||||
}
|
||||
|
||||
// blocks returns the number of divisions of the dimension length with the given
|
||||
// block size.
|
||||
func blocks(dim, bsize int) int {
|
||||
return (dim + bsize - 1) / bsize
|
||||
}
|
||||
|
||||
// dcabs1 returns |real(z)|+|imag(z)|.
|
||||
func dcabs1(z complex128) float64 {
|
||||
return math.Abs(real(z)) + math.Abs(imag(z))
|
||||
}
|
442
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx128.go
generated
vendored
Normal file
442
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1cmplx128.go
generated
vendored
Normal file
@ -0,0 +1,442 @@
|
||||
// Copyright ©2017 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"gonum.org/v1/gonum/internal/asm/c128"
|
||||
)
|
||||
|
||||
// Dzasum returns the sum of the absolute values of the elements of x
|
||||
// \sum_i |Re(x[i])| + |Im(x[i])|
|
||||
// Dzasum returns 0 if incX is negative.
|
||||
func (Implementation) Dzasum(n int, x []complex128, incX int) float64 {
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
var sum float64
|
||||
if incX == 1 {
|
||||
if len(x) < n {
|
||||
panic(badX)
|
||||
}
|
||||
for _, v := range x[:n] {
|
||||
sum += dcabs1(v)
|
||||
}
|
||||
return sum
|
||||
}
|
||||
if (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
v := x[i*incX]
|
||||
sum += dcabs1(v)
|
||||
}
|
||||
return sum
|
||||
}
|
||||
|
||||
// Dznrm2 computes the Euclidean norm of the complex vector x,
|
||||
// ‖x‖_2 = sqrt(\sum_i x[i] * conj(x[i])).
|
||||
// This function returns 0 if incX is negative.
|
||||
func (Implementation) Dznrm2(n int, x []complex128, incX int) float64 {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
var (
|
||||
scale float64
|
||||
ssq float64 = 1
|
||||
)
|
||||
if incX == 1 {
|
||||
for _, v := range x[:n] {
|
||||
re, im := math.Abs(real(v)), math.Abs(imag(v))
|
||||
if re != 0 {
|
||||
if re > scale {
|
||||
ssq = 1 + ssq*(scale/re)*(scale/re)
|
||||
scale = re
|
||||
} else {
|
||||
ssq += (re / scale) * (re / scale)
|
||||
}
|
||||
}
|
||||
if im != 0 {
|
||||
if im > scale {
|
||||
ssq = 1 + ssq*(scale/im)*(scale/im)
|
||||
scale = im
|
||||
} else {
|
||||
ssq += (im / scale) * (im / scale)
|
||||
}
|
||||
}
|
||||
}
|
||||
if math.IsInf(scale, 1) {
|
||||
return math.Inf(1)
|
||||
}
|
||||
return scale * math.Sqrt(ssq)
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
re, im := math.Abs(real(x[ix])), math.Abs(imag(x[ix]))
|
||||
if re != 0 {
|
||||
if re > scale {
|
||||
ssq = 1 + ssq*(scale/re)*(scale/re)
|
||||
scale = re
|
||||
} else {
|
||||
ssq += (re / scale) * (re / scale)
|
||||
}
|
||||
}
|
||||
if im != 0 {
|
||||
if im > scale {
|
||||
ssq = 1 + ssq*(scale/im)*(scale/im)
|
||||
scale = im
|
||||
} else {
|
||||
ssq += (im / scale) * (im / scale)
|
||||
}
|
||||
}
|
||||
}
|
||||
if math.IsInf(scale, 1) {
|
||||
return math.Inf(1)
|
||||
}
|
||||
return scale * math.Sqrt(ssq)
|
||||
}
|
||||
|
||||
// Izamax returns the index of the first element of x having largest |Re(·)|+|Im(·)|.
|
||||
// Izamax returns -1 if n is 0 or incX is negative.
|
||||
func (Implementation) Izamax(n int, x []complex128, incX int) int {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
// Return invalid index.
|
||||
return -1
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
// Return invalid index.
|
||||
return -1
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if len(x) <= (n-1)*incX {
|
||||
panic(badX)
|
||||
}
|
||||
idx := 0
|
||||
max := dcabs1(x[0])
|
||||
if incX == 1 {
|
||||
for i, v := range x[1:n] {
|
||||
absV := dcabs1(v)
|
||||
if absV > max {
|
||||
max = absV
|
||||
idx = i + 1
|
||||
}
|
||||
}
|
||||
return idx
|
||||
}
|
||||
ix := incX
|
||||
for i := 1; i < n; i++ {
|
||||
absV := dcabs1(x[ix])
|
||||
if absV > max {
|
||||
max = absV
|
||||
idx = i
|
||||
}
|
||||
ix += incX
|
||||
}
|
||||
return idx
|
||||
}
|
||||
|
||||
// Zaxpy adds alpha times x to y:
|
||||
// y[i] += alpha * x[i] for all i
|
||||
func (Implementation) Zaxpy(n int, alpha complex128, x []complex128, incX int, y []complex128, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if alpha == 0 {
|
||||
return
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
c128.AxpyUnitary(alpha, x[:n], y[:n])
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (1 - n) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (1 - n) * incY
|
||||
}
|
||||
c128.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))
|
||||
}
|
||||
|
||||
// Zcopy copies the vector x to vector y.
|
||||
func (Implementation) Zcopy(n int, x []complex128, incX int, y []complex128, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
copy(y[:n], x[:n])
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
y[iy] = x[ix]
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
||||
|
||||
// Zdotc computes the dot product
|
||||
// x^H · y
|
||||
// of two complex vectors x and y.
|
||||
func (Implementation) Zdotc(n int, x []complex128, incX int, y []complex128, incY int) complex128 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n <= 0 {
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
if len(x) < n {
|
||||
panic(badX)
|
||||
}
|
||||
if len(y) < n {
|
||||
panic(badY)
|
||||
}
|
||||
return c128.DotcUnitary(x[:n], y[:n])
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
if ix >= len(x) || (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if iy >= len(y) || (n-1)*incY >= len(y) {
|
||||
panic(badY)
|
||||
}
|
||||
return c128.DotcInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))
|
||||
}
|
||||
|
||||
// Zdotu computes the dot product
|
||||
// x^T · y
|
||||
// of two complex vectors x and y.
|
||||
func (Implementation) Zdotu(n int, x []complex128, incX int, y []complex128, incY int) complex128 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n <= 0 {
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
if len(x) < n {
|
||||
panic(badX)
|
||||
}
|
||||
if len(y) < n {
|
||||
panic(badY)
|
||||
}
|
||||
return c128.DotuUnitary(x[:n], y[:n])
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
if ix >= len(x) || (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if iy >= len(y) || (n-1)*incY >= len(y) {
|
||||
panic(badY)
|
||||
}
|
||||
return c128.DotuInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))
|
||||
}
|
||||
|
||||
// Zdscal scales the vector x by a real scalar alpha.
|
||||
// Zdscal has no effect if incX < 0.
|
||||
func (Implementation) Zdscal(n int, alpha float64, x []complex128, incX int) {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if alpha == 0 {
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for i := range x {
|
||||
x[i] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
x[ix] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for i, v := range x {
|
||||
x[i] = complex(alpha*real(v), alpha*imag(v))
|
||||
}
|
||||
return
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
v := x[ix]
|
||||
x[ix] = complex(alpha*real(v), alpha*imag(v))
|
||||
}
|
||||
}
|
||||
|
||||
// Zscal scales the vector x by a complex scalar alpha.
|
||||
// Zscal has no effect if incX < 0.
|
||||
func (Implementation) Zscal(n int, alpha complex128, x []complex128, incX int) {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if alpha == 0 {
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for i := range x {
|
||||
x[i] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
x[ix] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
if incX == 1 {
|
||||
c128.ScalUnitary(alpha, x[:n])
|
||||
return
|
||||
}
|
||||
c128.ScalInc(alpha, x, uintptr(n), uintptr(incX))
|
||||
}
|
||||
|
||||
// Zswap exchanges the elements of two complex vectors x and y.
|
||||
func (Implementation) Zswap(n int, x []complex128, incX int, y []complex128, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, v := range x {
|
||||
x[i], y[i] = y[i], v
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
x[ix], y[iy] = y[iy], x[ix]
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
620
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1double.go
generated
vendored
Normal file
620
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1double.go
generated
vendored
Normal file
@ -0,0 +1,620 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import (
|
||||
"math"
|
||||
|
||||
"gonum.org/v1/gonum/blas"
|
||||
"gonum.org/v1/gonum/internal/asm/f64"
|
||||
)
|
||||
|
||||
var _ blas.Float64Level1 = Implementation{}
|
||||
|
||||
// Dnrm2 computes the Euclidean norm of a vector,
|
||||
// sqrt(\sum_i x[i] * x[i]).
|
||||
// This function returns 0 if incX is negative.
|
||||
func (Implementation) Dnrm2(n int, x []float64, incX int) float64 {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
if incX > 0 && (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if n < 2 {
|
||||
if n == 1 {
|
||||
return math.Abs(x[0])
|
||||
}
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
var (
|
||||
scale float64 = 0
|
||||
sumSquares float64 = 1
|
||||
)
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for _, v := range x {
|
||||
if v == 0 {
|
||||
continue
|
||||
}
|
||||
absxi := math.Abs(v)
|
||||
if math.IsNaN(absxi) {
|
||||
return math.NaN()
|
||||
}
|
||||
if scale < absxi {
|
||||
sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi)
|
||||
scale = absxi
|
||||
} else {
|
||||
sumSquares = sumSquares + (absxi/scale)*(absxi/scale)
|
||||
}
|
||||
}
|
||||
if math.IsInf(scale, 1) {
|
||||
return math.Inf(1)
|
||||
}
|
||||
return scale * math.Sqrt(sumSquares)
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
val := x[ix]
|
||||
if val == 0 {
|
||||
continue
|
||||
}
|
||||
absxi := math.Abs(val)
|
||||
if math.IsNaN(absxi) {
|
||||
return math.NaN()
|
||||
}
|
||||
if scale < absxi {
|
||||
sumSquares = 1 + sumSquares*(scale/absxi)*(scale/absxi)
|
||||
scale = absxi
|
||||
} else {
|
||||
sumSquares = sumSquares + (absxi/scale)*(absxi/scale)
|
||||
}
|
||||
}
|
||||
if math.IsInf(scale, 1) {
|
||||
return math.Inf(1)
|
||||
}
|
||||
return scale * math.Sqrt(sumSquares)
|
||||
}
|
||||
|
||||
// Dasum computes the sum of the absolute values of the elements of x.
|
||||
// \sum_i |x[i]|
|
||||
// Dasum returns 0 if incX is negative.
|
||||
func (Implementation) Dasum(n int, x []float64, incX int) float64 {
|
||||
var sum float64
|
||||
if n < 0 {
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
if incX > 0 && (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for _, v := range x {
|
||||
sum += math.Abs(v)
|
||||
}
|
||||
return sum
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
sum += math.Abs(x[i*incX])
|
||||
}
|
||||
return sum
|
||||
}
|
||||
|
||||
// Idamax returns the index of an element of x with the largest absolute value.
|
||||
// If there are multiple such indices the earliest is returned.
|
||||
// Idamax returns -1 if n == 0.
|
||||
func (Implementation) Idamax(n int, x []float64, incX int) int {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return -1
|
||||
}
|
||||
if incX > 0 && (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if n < 2 {
|
||||
if n == 1 {
|
||||
return 0
|
||||
}
|
||||
if n == 0 {
|
||||
return -1 // Netlib returns invalid index when n == 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
idx := 0
|
||||
max := math.Abs(x[0])
|
||||
if incX == 1 {
|
||||
for i, v := range x[:n] {
|
||||
absV := math.Abs(v)
|
||||
if absV > max {
|
||||
max = absV
|
||||
idx = i
|
||||
}
|
||||
}
|
||||
return idx
|
||||
}
|
||||
ix := incX
|
||||
for i := 1; i < n; i++ {
|
||||
v := x[ix]
|
||||
absV := math.Abs(v)
|
||||
if absV > max {
|
||||
max = absV
|
||||
idx = i
|
||||
}
|
||||
ix += incX
|
||||
}
|
||||
return idx
|
||||
}
|
||||
|
||||
// Dswap exchanges the elements of two vectors.
|
||||
// x[i], y[i] = y[i], x[i] for all i
|
||||
func (Implementation) Dswap(n int, x []float64, incX int, y []float64, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, v := range x {
|
||||
x[i], y[i] = y[i], v
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
x[ix], y[iy] = y[iy], x[ix]
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
||||
|
||||
// Dcopy copies the elements of x into the elements of y.
|
||||
// y[i] = x[i] for all i
|
||||
func (Implementation) Dcopy(n int, x []float64, incX int, y []float64, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
copy(y[:n], x[:n])
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
y[iy] = x[ix]
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
||||
|
||||
// Daxpy adds alpha times x to y
|
||||
// y[i] += alpha * x[i] for all i
|
||||
func (Implementation) Daxpy(n int, alpha float64, x []float64, incX int, y []float64, incY int) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if alpha == 0 {
|
||||
return
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
f64.AxpyUnitary(alpha, x[:n], y[:n])
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
f64.AxpyInc(alpha, x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))
|
||||
}
|
||||
|
||||
// Drotg computes the plane rotation
|
||||
// _ _ _ _ _ _
|
||||
// | c s | | a | | r |
|
||||
// | -s c | * | b | = | 0 |
|
||||
// ‾ ‾ ‾ ‾ ‾ ‾
|
||||
// where
|
||||
// r = ±√(a^2 + b^2)
|
||||
// c = a/r, the cosine of the plane rotation
|
||||
// s = b/r, the sine of the plane rotation
|
||||
//
|
||||
// NOTE: There is a discrepancy between the refence implementation and the BLAS
|
||||
// technical manual regarding the sign for r when a or b are zero.
|
||||
// Drotg agrees with the definition in the manual and other
|
||||
// common BLAS implementations.
|
||||
func (Implementation) Drotg(a, b float64) (c, s, r, z float64) {
|
||||
if b == 0 && a == 0 {
|
||||
return 1, 0, a, 0
|
||||
}
|
||||
absA := math.Abs(a)
|
||||
absB := math.Abs(b)
|
||||
aGTb := absA > absB
|
||||
r = math.Hypot(a, b)
|
||||
if aGTb {
|
||||
r = math.Copysign(r, a)
|
||||
} else {
|
||||
r = math.Copysign(r, b)
|
||||
}
|
||||
c = a / r
|
||||
s = b / r
|
||||
if aGTb {
|
||||
z = s
|
||||
} else if c != 0 { // r == 0 case handled above
|
||||
z = 1 / c
|
||||
} else {
|
||||
z = 1
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Drotmg computes the modified Givens rotation. See
|
||||
// http://www.netlib.org/lapack/explore-html/df/deb/drotmg_8f.html
|
||||
// for more details.
|
||||
func (Implementation) Drotmg(d1, d2, x1, y1 float64) (p blas.DrotmParams, rd1, rd2, rx1 float64) {
|
||||
// The implementation of Drotmg used here is taken from Hopkins 1997
|
||||
// Appendix A: https://doi.org/10.1145/289251.289253
|
||||
// with the exception of the gam constants below.
|
||||
|
||||
const (
|
||||
gam = 4096.0
|
||||
gamsq = gam * gam
|
||||
rgamsq = 1.0 / gamsq
|
||||
)
|
||||
|
||||
if d1 < 0 {
|
||||
p.Flag = blas.Rescaling // Error state.
|
||||
return p, 0, 0, 0
|
||||
}
|
||||
|
||||
if d2 == 0 || y1 == 0 {
|
||||
p.Flag = blas.Identity
|
||||
return p, d1, d2, x1
|
||||
}
|
||||
|
||||
var h11, h12, h21, h22 float64
|
||||
if (d1 == 0 || x1 == 0) && d2 > 0 {
|
||||
p.Flag = blas.Diagonal
|
||||
h12 = 1
|
||||
h21 = -1
|
||||
x1 = y1
|
||||
d1, d2 = d2, d1
|
||||
} else {
|
||||
p2 := d2 * y1
|
||||
p1 := d1 * x1
|
||||
q2 := p2 * y1
|
||||
q1 := p1 * x1
|
||||
if math.Abs(q1) > math.Abs(q2) {
|
||||
p.Flag = blas.OffDiagonal
|
||||
h11 = 1
|
||||
h22 = 1
|
||||
h21 = -y1 / x1
|
||||
h12 = p2 / p1
|
||||
u := 1 - h12*h21
|
||||
if u <= 0 {
|
||||
p.Flag = blas.Rescaling // Error state.
|
||||
return p, 0, 0, 0
|
||||
}
|
||||
|
||||
d1 /= u
|
||||
d2 /= u
|
||||
x1 *= u
|
||||
} else {
|
||||
if q2 < 0 {
|
||||
p.Flag = blas.Rescaling // Error state.
|
||||
return p, 0, 0, 0
|
||||
}
|
||||
|
||||
p.Flag = blas.Diagonal
|
||||
h21 = -1
|
||||
h12 = 1
|
||||
h11 = p1 / p2
|
||||
h22 = x1 / y1
|
||||
u := 1 + h11*h22
|
||||
d1, d2 = d2/u, d1/u
|
||||
x1 = y1 * u
|
||||
}
|
||||
}
|
||||
|
||||
for d1 <= rgamsq && d1 != 0 {
|
||||
p.Flag = blas.Rescaling
|
||||
d1 = (d1 * gam) * gam
|
||||
x1 /= gam
|
||||
h11 /= gam
|
||||
h12 /= gam
|
||||
}
|
||||
for d1 > gamsq {
|
||||
p.Flag = blas.Rescaling
|
||||
d1 = (d1 / gam) / gam
|
||||
x1 *= gam
|
||||
h11 *= gam
|
||||
h12 *= gam
|
||||
}
|
||||
|
||||
for math.Abs(d2) <= rgamsq && d2 != 0 {
|
||||
p.Flag = blas.Rescaling
|
||||
d2 = (d2 * gam) * gam
|
||||
h21 /= gam
|
||||
h22 /= gam
|
||||
}
|
||||
for math.Abs(d2) > gamsq {
|
||||
p.Flag = blas.Rescaling
|
||||
d2 = (d2 / gam) / gam
|
||||
h21 *= gam
|
||||
h22 *= gam
|
||||
}
|
||||
|
||||
switch p.Flag {
|
||||
case blas.Diagonal:
|
||||
p.H = [4]float64{0: h11, 3: h22}
|
||||
case blas.OffDiagonal:
|
||||
p.H = [4]float64{1: h21, 2: h12}
|
||||
case blas.Rescaling:
|
||||
p.H = [4]float64{h11, h21, h12, h22}
|
||||
default:
|
||||
panic("blas: unexpected blas.Flag")
|
||||
}
|
||||
|
||||
return p, d1, d2, x1
|
||||
}
|
||||
|
||||
// Drot applies a plane transformation.
|
||||
// x[i] = c * x[i] + s * y[i]
|
||||
// y[i] = c * y[i] - s * x[i]
|
||||
func (Implementation) Drot(n int, x []float64, incX int, y []float64, incY int, c float64, s float64) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, vx := range x {
|
||||
vy := y[i]
|
||||
x[i], y[i] = c*vx+s*vy, c*vy-s*vx
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
vx := x[ix]
|
||||
vy := y[iy]
|
||||
x[ix], y[iy] = c*vx+s*vy, c*vy-s*vx
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
||||
|
||||
// Drotm applies the modified Givens rotation to the 2×n matrix.
|
||||
func (Implementation) Drotm(n int, x []float64, incX int, y []float64, incY int, p blas.DrotmParams) {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n <= 0 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if (incX > 0 && (n-1)*incX >= len(x)) || (incX < 0 && (1-n)*incX >= len(x)) {
|
||||
panic(badX)
|
||||
}
|
||||
if (incY > 0 && (n-1)*incY >= len(y)) || (incY < 0 && (1-n)*incY >= len(y)) {
|
||||
panic(badY)
|
||||
}
|
||||
|
||||
if p.Flag == blas.Identity {
|
||||
return
|
||||
}
|
||||
|
||||
switch p.Flag {
|
||||
case blas.Rescaling:
|
||||
h11 := p.H[0]
|
||||
h12 := p.H[2]
|
||||
h21 := p.H[1]
|
||||
h22 := p.H[3]
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, vx := range x {
|
||||
vy := y[i]
|
||||
x[i], y[i] = vx*h11+vy*h12, vx*h21+vy*h22
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
vx := x[ix]
|
||||
vy := y[iy]
|
||||
x[ix], y[iy] = vx*h11+vy*h12, vx*h21+vy*h22
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
case blas.OffDiagonal:
|
||||
h12 := p.H[2]
|
||||
h21 := p.H[1]
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, vx := range x {
|
||||
vy := y[i]
|
||||
x[i], y[i] = vx+vy*h12, vx*h21+vy
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
vx := x[ix]
|
||||
vy := y[iy]
|
||||
x[ix], y[iy] = vx+vy*h12, vx*h21+vy
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
case blas.Diagonal:
|
||||
h11 := p.H[0]
|
||||
h22 := p.H[3]
|
||||
if incX == 1 && incY == 1 {
|
||||
x = x[:n]
|
||||
for i, vx := range x {
|
||||
vy := y[i]
|
||||
x[i], y[i] = vx*h11+vy, -vx+vy*h22
|
||||
}
|
||||
return
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
for i := 0; i < n; i++ {
|
||||
vx := x[ix]
|
||||
vy := y[iy]
|
||||
x[ix], y[iy] = vx*h11+vy, -vx+vy*h22
|
||||
ix += incX
|
||||
iy += incY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Dscal scales x by alpha.
|
||||
// x[i] *= alpha
|
||||
// Dscal has no effect if incX < 0.
|
||||
func (Implementation) Dscal(n int, alpha float64, x []float64, incX int) {
|
||||
if incX < 1 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
return
|
||||
}
|
||||
if (n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if n < 1 {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if alpha == 0 {
|
||||
if incX == 1 {
|
||||
x = x[:n]
|
||||
for i := range x {
|
||||
x[i] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
for ix := 0; ix < n*incX; ix += incX {
|
||||
x[ix] = 0
|
||||
}
|
||||
return
|
||||
}
|
||||
if incX == 1 {
|
||||
f64.ScalUnitary(alpha, x[:n])
|
||||
return
|
||||
}
|
||||
f64.ScalInc(alpha, x, uintptr(n), uintptr(incX))
|
||||
}
|
49
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1double_ddot.go
generated
vendored
Normal file
49
vendor/k8s.io/code-generator/vendor/gonum.org/v1/gonum/blas/gonum/level1double_ddot.go
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
// Copyright ©2015 The Gonum Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package gonum
|
||||
|
||||
import (
|
||||
"gonum.org/v1/gonum/internal/asm/f64"
|
||||
)
|
||||
|
||||
// Ddot computes the dot product of the two vectors
|
||||
// \sum_i x[i]*y[i]
|
||||
func (Implementation) Ddot(n int, x []float64, incX int, y []float64, incY int) float64 {
|
||||
if incX == 0 {
|
||||
panic(zeroIncX)
|
||||
}
|
||||
if incY == 0 {
|
||||
panic(zeroIncY)
|
||||
}
|
||||
if n <= 0 {
|
||||
if n == 0 {
|
||||
return 0
|
||||
}
|
||||
panic(nLT0)
|
||||
}
|
||||
if incX == 1 && incY == 1 {
|
||||
if len(x) < n {
|
||||
panic(badX)
|
||||
}
|
||||
if len(y) < n {
|
||||
panic(badY)
|
||||
}
|
||||
return f64.DotUnitary(x[:n], y)
|
||||
}
|
||||
var ix, iy int
|
||||
if incX < 0 {
|
||||
ix = (-n + 1) * incX
|
||||
}
|
||||
if incY < 0 {
|
||||
iy = (-n + 1) * incY
|
||||
}
|
||||
if ix >= len(x) || ix+(n-1)*incX >= len(x) {
|
||||
panic(badX)
|
||||
}
|
||||
if iy >= len(y) || iy+(n-1)*incY >= len(y) {
|
||||
panic(badY)
|
||||
}
|
||||
return f64.DotInc(x, y, uintptr(n), uintptr(incX), uintptr(incY), uintptr(ix), uintptr(iy))
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user