X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=vendor%2Fgonum.org%2Fv1%2Fgonum%2Fmat%2Foffset.go;fp=vendor%2Fgonum.org%2Fv1%2Fgonum%2Fmat%2Foffset.go;h=0000000000000000000000000000000000000000;hp=7341cc0ceb127413ef3162ef496082a95ea337e1;hb=54373c1a3efe0e373ec1605840a4363e4b246c46;hpb=ee01d543fdfe1fd0a4d548965c66f7923ea7b062 diff --git a/vendor/gonum.org/v1/gonum/mat/offset.go b/vendor/gonum.org/v1/gonum/mat/offset.go deleted file mode 100644 index 7341cc0c..00000000 --- a/vendor/gonum.org/v1/gonum/mat/offset.go +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -//+build !appengine - -package mat - -import "unsafe" - -// offset returns the number of float64 values b[0] is after a[0]. -func offset(a, b []float64) int { - if &a[0] == &b[0] { - return 0 - } - // This expression must be atomic with respect to GC moves. - // At this stage this is true, because the GC does not - // move. See https://golang.org/issue/12445. - return int(uintptr(unsafe.Pointer(&b[0]))-uintptr(unsafe.Pointer(&a[0]))) / int(unsafe.Sizeof(float64(0))) -}