1 // Code generated by type_traits_numeric.gen.go.tmpl. DO NOT EDIT.
3 // Licensed to the Apache Software Foundation (ASF) under one
4 // or more contributor license agreements. See the NOTICE file
5 // distributed with this work for additional information
6 // regarding copyright ownership. The ASF licenses this file
7 // to you under the Apache License, Version 2.0 (the
8 // "License"); you may not use this file except in compliance
9 // with the License. You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 package arrow // import "github.com/apache/arrow/go/v6/arrow"
26 "github.com/apache/arrow/go/v6/arrow/endian"
30 Int64Traits int64Traits
31 Uint64Traits uint64Traits
32 Float64Traits float64Traits
33 Int32Traits int32Traits
34 Uint32Traits uint32Traits
35 Float32Traits float32Traits
36 Int16Traits int16Traits
37 Uint16Traits uint16Traits
39 Uint8Traits uint8Traits
40 TimestampTraits timestampTraits
41 Time32Traits time32Traits
42 Time64Traits time64Traits
43 Date32Traits date32Traits
44 Date64Traits date64Traits
45 DurationTraits durationTraits
51 // Int64SizeBytes specifies the number of bytes required to store a single int64 in memory
52 Int64SizeBytes = int(unsafe.Sizeof(int64(0)))
55 type int64Traits struct{}
57 // BytesRequired returns the number of bytes required to store n elements in memory.
58 func (int64Traits) BytesRequired(n int) int { return Int64SizeBytes * n }
61 func (int64Traits) PutValue(b []byte, v int64) {
62 endian.Native.PutUint64(b, uint64(v))
65 // CastFromBytes reinterprets the slice b to a slice of type int64.
67 // NOTE: len(b) must be a multiple of Int64SizeBytes.
68 func (int64Traits) CastFromBytes(b []byte) []int64 {
69 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
72 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
74 s.Len = h.Len / Int64SizeBytes
75 s.Cap = h.Cap / Int64SizeBytes
80 // CastToBytes reinterprets the slice b to a slice of bytes.
81 func (int64Traits) CastToBytes(b []int64) []byte {
82 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
85 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
87 s.Len = h.Len * Int64SizeBytes
88 s.Cap = h.Cap * Int64SizeBytes
93 // Copy copies src to dst.
94 func (int64Traits) Copy(dst, src []int64) { copy(dst, src) }
99 // Uint64SizeBytes specifies the number of bytes required to store a single uint64 in memory
100 Uint64SizeBytes = int(unsafe.Sizeof(uint64(0)))
103 type uint64Traits struct{}
105 // BytesRequired returns the number of bytes required to store n elements in memory.
106 func (uint64Traits) BytesRequired(n int) int { return Uint64SizeBytes * n }
109 func (uint64Traits) PutValue(b []byte, v uint64) {
110 endian.Native.PutUint64(b, uint64(v))
113 // CastFromBytes reinterprets the slice b to a slice of type uint64.
115 // NOTE: len(b) must be a multiple of Uint64SizeBytes.
116 func (uint64Traits) CastFromBytes(b []byte) []uint64 {
117 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
120 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
122 s.Len = h.Len / Uint64SizeBytes
123 s.Cap = h.Cap / Uint64SizeBytes
128 // CastToBytes reinterprets the slice b to a slice of bytes.
129 func (uint64Traits) CastToBytes(b []uint64) []byte {
130 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
133 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
135 s.Len = h.Len * Uint64SizeBytes
136 s.Cap = h.Cap * Uint64SizeBytes
141 // Copy copies src to dst.
142 func (uint64Traits) Copy(dst, src []uint64) { copy(dst, src) }
147 // Float64SizeBytes specifies the number of bytes required to store a single float64 in memory
148 Float64SizeBytes = int(unsafe.Sizeof(float64(0)))
151 type float64Traits struct{}
153 // BytesRequired returns the number of bytes required to store n elements in memory.
154 func (float64Traits) BytesRequired(n int) int { return Float64SizeBytes * n }
157 func (float64Traits) PutValue(b []byte, v float64) {
158 endian.Native.PutUint64(b, math.Float64bits(v))
161 // CastFromBytes reinterprets the slice b to a slice of type float64.
163 // NOTE: len(b) must be a multiple of Float64SizeBytes.
164 func (float64Traits) CastFromBytes(b []byte) []float64 {
165 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
168 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
170 s.Len = h.Len / Float64SizeBytes
171 s.Cap = h.Cap / Float64SizeBytes
176 // CastToBytes reinterprets the slice b to a slice of bytes.
177 func (float64Traits) CastToBytes(b []float64) []byte {
178 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
181 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
183 s.Len = h.Len * Float64SizeBytes
184 s.Cap = h.Cap * Float64SizeBytes
189 // Copy copies src to dst.
190 func (float64Traits) Copy(dst, src []float64) { copy(dst, src) }
195 // Int32SizeBytes specifies the number of bytes required to store a single int32 in memory
196 Int32SizeBytes = int(unsafe.Sizeof(int32(0)))
199 type int32Traits struct{}
201 // BytesRequired returns the number of bytes required to store n elements in memory.
202 func (int32Traits) BytesRequired(n int) int { return Int32SizeBytes * n }
205 func (int32Traits) PutValue(b []byte, v int32) {
206 endian.Native.PutUint32(b, uint32(v))
209 // CastFromBytes reinterprets the slice b to a slice of type int32.
211 // NOTE: len(b) must be a multiple of Int32SizeBytes.
212 func (int32Traits) CastFromBytes(b []byte) []int32 {
213 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
216 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
218 s.Len = h.Len / Int32SizeBytes
219 s.Cap = h.Cap / Int32SizeBytes
224 // CastToBytes reinterprets the slice b to a slice of bytes.
225 func (int32Traits) CastToBytes(b []int32) []byte {
226 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
229 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
231 s.Len = h.Len * Int32SizeBytes
232 s.Cap = h.Cap * Int32SizeBytes
237 // Copy copies src to dst.
238 func (int32Traits) Copy(dst, src []int32) { copy(dst, src) }
243 // Uint32SizeBytes specifies the number of bytes required to store a single uint32 in memory
244 Uint32SizeBytes = int(unsafe.Sizeof(uint32(0)))
247 type uint32Traits struct{}
249 // BytesRequired returns the number of bytes required to store n elements in memory.
250 func (uint32Traits) BytesRequired(n int) int { return Uint32SizeBytes * n }
253 func (uint32Traits) PutValue(b []byte, v uint32) {
254 endian.Native.PutUint32(b, uint32(v))
257 // CastFromBytes reinterprets the slice b to a slice of type uint32.
259 // NOTE: len(b) must be a multiple of Uint32SizeBytes.
260 func (uint32Traits) CastFromBytes(b []byte) []uint32 {
261 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
264 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
266 s.Len = h.Len / Uint32SizeBytes
267 s.Cap = h.Cap / Uint32SizeBytes
272 // CastToBytes reinterprets the slice b to a slice of bytes.
273 func (uint32Traits) CastToBytes(b []uint32) []byte {
274 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
277 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
279 s.Len = h.Len * Uint32SizeBytes
280 s.Cap = h.Cap * Uint32SizeBytes
285 // Copy copies src to dst.
286 func (uint32Traits) Copy(dst, src []uint32) { copy(dst, src) }
291 // Float32SizeBytes specifies the number of bytes required to store a single float32 in memory
292 Float32SizeBytes = int(unsafe.Sizeof(float32(0)))
295 type float32Traits struct{}
297 // BytesRequired returns the number of bytes required to store n elements in memory.
298 func (float32Traits) BytesRequired(n int) int { return Float32SizeBytes * n }
301 func (float32Traits) PutValue(b []byte, v float32) {
302 endian.Native.PutUint32(b, math.Float32bits(v))
305 // CastFromBytes reinterprets the slice b to a slice of type float32.
307 // NOTE: len(b) must be a multiple of Float32SizeBytes.
308 func (float32Traits) CastFromBytes(b []byte) []float32 {
309 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
312 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
314 s.Len = h.Len / Float32SizeBytes
315 s.Cap = h.Cap / Float32SizeBytes
320 // CastToBytes reinterprets the slice b to a slice of bytes.
321 func (float32Traits) CastToBytes(b []float32) []byte {
322 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
325 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
327 s.Len = h.Len * Float32SizeBytes
328 s.Cap = h.Cap * Float32SizeBytes
333 // Copy copies src to dst.
334 func (float32Traits) Copy(dst, src []float32) { copy(dst, src) }
339 // Int16SizeBytes specifies the number of bytes required to store a single int16 in memory
340 Int16SizeBytes = int(unsafe.Sizeof(int16(0)))
343 type int16Traits struct{}
345 // BytesRequired returns the number of bytes required to store n elements in memory.
346 func (int16Traits) BytesRequired(n int) int { return Int16SizeBytes * n }
349 func (int16Traits) PutValue(b []byte, v int16) {
350 endian.Native.PutUint16(b, uint16(v))
353 // CastFromBytes reinterprets the slice b to a slice of type int16.
355 // NOTE: len(b) must be a multiple of Int16SizeBytes.
356 func (int16Traits) CastFromBytes(b []byte) []int16 {
357 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
360 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
362 s.Len = h.Len / Int16SizeBytes
363 s.Cap = h.Cap / Int16SizeBytes
368 // CastToBytes reinterprets the slice b to a slice of bytes.
369 func (int16Traits) CastToBytes(b []int16) []byte {
370 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
373 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
375 s.Len = h.Len * Int16SizeBytes
376 s.Cap = h.Cap * Int16SizeBytes
381 // Copy copies src to dst.
382 func (int16Traits) Copy(dst, src []int16) { copy(dst, src) }
387 // Uint16SizeBytes specifies the number of bytes required to store a single uint16 in memory
388 Uint16SizeBytes = int(unsafe.Sizeof(uint16(0)))
391 type uint16Traits struct{}
393 // BytesRequired returns the number of bytes required to store n elements in memory.
394 func (uint16Traits) BytesRequired(n int) int { return Uint16SizeBytes * n }
397 func (uint16Traits) PutValue(b []byte, v uint16) {
398 endian.Native.PutUint16(b, uint16(v))
401 // CastFromBytes reinterprets the slice b to a slice of type uint16.
403 // NOTE: len(b) must be a multiple of Uint16SizeBytes.
404 func (uint16Traits) CastFromBytes(b []byte) []uint16 {
405 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
408 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
410 s.Len = h.Len / Uint16SizeBytes
411 s.Cap = h.Cap / Uint16SizeBytes
416 // CastToBytes reinterprets the slice b to a slice of bytes.
417 func (uint16Traits) CastToBytes(b []uint16) []byte {
418 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
421 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
423 s.Len = h.Len * Uint16SizeBytes
424 s.Cap = h.Cap * Uint16SizeBytes
429 // Copy copies src to dst.
430 func (uint16Traits) Copy(dst, src []uint16) { copy(dst, src) }
435 // Int8SizeBytes specifies the number of bytes required to store a single int8 in memory
436 Int8SizeBytes = int(unsafe.Sizeof(int8(0)))
439 type int8Traits struct{}
441 // BytesRequired returns the number of bytes required to store n elements in memory.
442 func (int8Traits) BytesRequired(n int) int { return Int8SizeBytes * n }
445 func (int8Traits) PutValue(b []byte, v int8) {
449 // CastFromBytes reinterprets the slice b to a slice of type int8.
451 // NOTE: len(b) must be a multiple of Int8SizeBytes.
452 func (int8Traits) CastFromBytes(b []byte) []int8 {
453 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
456 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
458 s.Len = h.Len / Int8SizeBytes
459 s.Cap = h.Cap / Int8SizeBytes
464 // CastToBytes reinterprets the slice b to a slice of bytes.
465 func (int8Traits) CastToBytes(b []int8) []byte {
466 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
469 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
471 s.Len = h.Len * Int8SizeBytes
472 s.Cap = h.Cap * Int8SizeBytes
477 // Copy copies src to dst.
478 func (int8Traits) Copy(dst, src []int8) { copy(dst, src) }
483 // Uint8SizeBytes specifies the number of bytes required to store a single uint8 in memory
484 Uint8SizeBytes = int(unsafe.Sizeof(uint8(0)))
487 type uint8Traits struct{}
489 // BytesRequired returns the number of bytes required to store n elements in memory.
490 func (uint8Traits) BytesRequired(n int) int { return Uint8SizeBytes * n }
493 func (uint8Traits) PutValue(b []byte, v uint8) {
497 // CastFromBytes reinterprets the slice b to a slice of type uint8.
499 // NOTE: len(b) must be a multiple of Uint8SizeBytes.
500 func (uint8Traits) CastFromBytes(b []byte) []uint8 {
501 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
504 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
506 s.Len = h.Len / Uint8SizeBytes
507 s.Cap = h.Cap / Uint8SizeBytes
512 // CastToBytes reinterprets the slice b to a slice of bytes.
513 func (uint8Traits) CastToBytes(b []uint8) []byte {
514 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
517 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
519 s.Len = h.Len * Uint8SizeBytes
520 s.Cap = h.Cap * Uint8SizeBytes
525 // Copy copies src to dst.
526 func (uint8Traits) Copy(dst, src []uint8) { copy(dst, src) }
531 // TimestampSizeBytes specifies the number of bytes required to store a single Timestamp in memory
532 TimestampSizeBytes = int(unsafe.Sizeof(Timestamp(0)))
535 type timestampTraits struct{}
537 // BytesRequired returns the number of bytes required to store n elements in memory.
538 func (timestampTraits) BytesRequired(n int) int { return TimestampSizeBytes * n }
541 func (timestampTraits) PutValue(b []byte, v Timestamp) {
542 endian.Native.PutUint64(b, uint64(v))
545 // CastFromBytes reinterprets the slice b to a slice of type Timestamp.
547 // NOTE: len(b) must be a multiple of TimestampSizeBytes.
548 func (timestampTraits) CastFromBytes(b []byte) []Timestamp {
549 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
552 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
554 s.Len = h.Len / TimestampSizeBytes
555 s.Cap = h.Cap / TimestampSizeBytes
560 // CastToBytes reinterprets the slice b to a slice of bytes.
561 func (timestampTraits) CastToBytes(b []Timestamp) []byte {
562 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
565 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
567 s.Len = h.Len * TimestampSizeBytes
568 s.Cap = h.Cap * TimestampSizeBytes
573 // Copy copies src to dst.
574 func (timestampTraits) Copy(dst, src []Timestamp) { copy(dst, src) }
579 // Time32SizeBytes specifies the number of bytes required to store a single Time32 in memory
580 Time32SizeBytes = int(unsafe.Sizeof(Time32(0)))
583 type time32Traits struct{}
585 // BytesRequired returns the number of bytes required to store n elements in memory.
586 func (time32Traits) BytesRequired(n int) int { return Time32SizeBytes * n }
589 func (time32Traits) PutValue(b []byte, v Time32) {
590 endian.Native.PutUint32(b, uint32(v))
593 // CastFromBytes reinterprets the slice b to a slice of type Time32.
595 // NOTE: len(b) must be a multiple of Time32SizeBytes.
596 func (time32Traits) CastFromBytes(b []byte) []Time32 {
597 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
600 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
602 s.Len = h.Len / Time32SizeBytes
603 s.Cap = h.Cap / Time32SizeBytes
608 // CastToBytes reinterprets the slice b to a slice of bytes.
609 func (time32Traits) CastToBytes(b []Time32) []byte {
610 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
613 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
615 s.Len = h.Len * Time32SizeBytes
616 s.Cap = h.Cap * Time32SizeBytes
621 // Copy copies src to dst.
622 func (time32Traits) Copy(dst, src []Time32) { copy(dst, src) }
627 // Time64SizeBytes specifies the number of bytes required to store a single Time64 in memory
628 Time64SizeBytes = int(unsafe.Sizeof(Time64(0)))
631 type time64Traits struct{}
633 // BytesRequired returns the number of bytes required to store n elements in memory.
634 func (time64Traits) BytesRequired(n int) int { return Time64SizeBytes * n }
637 func (time64Traits) PutValue(b []byte, v Time64) {
638 endian.Native.PutUint64(b, uint64(v))
641 // CastFromBytes reinterprets the slice b to a slice of type Time64.
643 // NOTE: len(b) must be a multiple of Time64SizeBytes.
644 func (time64Traits) CastFromBytes(b []byte) []Time64 {
645 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
648 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
650 s.Len = h.Len / Time64SizeBytes
651 s.Cap = h.Cap / Time64SizeBytes
656 // CastToBytes reinterprets the slice b to a slice of bytes.
657 func (time64Traits) CastToBytes(b []Time64) []byte {
658 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
661 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
663 s.Len = h.Len * Time64SizeBytes
664 s.Cap = h.Cap * Time64SizeBytes
669 // Copy copies src to dst.
670 func (time64Traits) Copy(dst, src []Time64) { copy(dst, src) }
675 // Date32SizeBytes specifies the number of bytes required to store a single Date32 in memory
676 Date32SizeBytes = int(unsafe.Sizeof(Date32(0)))
679 type date32Traits struct{}
681 // BytesRequired returns the number of bytes required to store n elements in memory.
682 func (date32Traits) BytesRequired(n int) int { return Date32SizeBytes * n }
685 func (date32Traits) PutValue(b []byte, v Date32) {
686 endian.Native.PutUint32(b, uint32(v))
689 // CastFromBytes reinterprets the slice b to a slice of type Date32.
691 // NOTE: len(b) must be a multiple of Date32SizeBytes.
692 func (date32Traits) CastFromBytes(b []byte) []Date32 {
693 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
696 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
698 s.Len = h.Len / Date32SizeBytes
699 s.Cap = h.Cap / Date32SizeBytes
704 // CastToBytes reinterprets the slice b to a slice of bytes.
705 func (date32Traits) CastToBytes(b []Date32) []byte {
706 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
709 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
711 s.Len = h.Len * Date32SizeBytes
712 s.Cap = h.Cap * Date32SizeBytes
717 // Copy copies src to dst.
718 func (date32Traits) Copy(dst, src []Date32) { copy(dst, src) }
723 // Date64SizeBytes specifies the number of bytes required to store a single Date64 in memory
724 Date64SizeBytes = int(unsafe.Sizeof(Date64(0)))
727 type date64Traits struct{}
729 // BytesRequired returns the number of bytes required to store n elements in memory.
730 func (date64Traits) BytesRequired(n int) int { return Date64SizeBytes * n }
733 func (date64Traits) PutValue(b []byte, v Date64) {
734 endian.Native.PutUint64(b, uint64(v))
737 // CastFromBytes reinterprets the slice b to a slice of type Date64.
739 // NOTE: len(b) must be a multiple of Date64SizeBytes.
740 func (date64Traits) CastFromBytes(b []byte) []Date64 {
741 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
744 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
746 s.Len = h.Len / Date64SizeBytes
747 s.Cap = h.Cap / Date64SizeBytes
752 // CastToBytes reinterprets the slice b to a slice of bytes.
753 func (date64Traits) CastToBytes(b []Date64) []byte {
754 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
757 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
759 s.Len = h.Len * Date64SizeBytes
760 s.Cap = h.Cap * Date64SizeBytes
765 // Copy copies src to dst.
766 func (date64Traits) Copy(dst, src []Date64) { copy(dst, src) }
771 // DurationSizeBytes specifies the number of bytes required to store a single Duration in memory
772 DurationSizeBytes = int(unsafe.Sizeof(Duration(0)))
775 type durationTraits struct{}
777 // BytesRequired returns the number of bytes required to store n elements in memory.
778 func (durationTraits) BytesRequired(n int) int { return DurationSizeBytes * n }
781 func (durationTraits) PutValue(b []byte, v Duration) {
782 endian.Native.PutUint64(b, uint64(v))
785 // CastFromBytes reinterprets the slice b to a slice of type Duration.
787 // NOTE: len(b) must be a multiple of DurationSizeBytes.
788 func (durationTraits) CastFromBytes(b []byte) []Duration {
789 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
792 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
794 s.Len = h.Len / DurationSizeBytes
795 s.Cap = h.Cap / DurationSizeBytes
800 // CastToBytes reinterprets the slice b to a slice of bytes.
801 func (durationTraits) CastToBytes(b []Duration) []byte {
802 h := (*reflect.SliceHeader)(unsafe.Pointer(&b))
805 s := (*reflect.SliceHeader)(unsafe.Pointer(&res))
807 s.Len = h.Len * DurationSizeBytes
808 s.Cap = h.Cap * DurationSizeBytes
813 // Copy copies src to dst.
814 func (durationTraits) Copy(dst, src []Duration) { copy(dst, src) }