code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2011 The Go 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 spdy implements the SPDY protocol (currently SPDY/3), described in // http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3. package spdy ...
Go
// Copyright 2009 The Go 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 websocket // This file implements a protocol of Hixie draft version 75 and 76 // (draft 76 equals to hybi 00) import ( "bufio" "bytes" "crypto/md5"...
Go
// Copyright 2009 The Go 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 websocket implements a client and server for the WebSocket protocol // as specified in RFC 6455. package websocket import ( "bufio" "crypto/tls" ...
Go
// Copyright 2011 The Go 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 websocket // This file implements a protocol of hybi draft. // http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 import ( "bufio" "...
Go
// Copyright 2009 The Go 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 websocket import ( "bufio" "fmt" "io" "net/http" ) func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request, config *Co...
Go
// Copyright 2009 The Go 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 websocket import ( "bufio" "crypto/tls" "io" "net" "net/http" "net/url" ) // DialError is an error that occurs while dialling a websocket server...
Go
// Copyright 2012 The Go 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 idna // This file implements the Punycode algorithm from RFC 3492. import ( "fmt" "math" "strings" "unicode/utf8" ) // These parameter values are...
Go
// Copyright 2012 The Go 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 idna implements IDNA2008 (Internationalized Domain Names for // Applications), defined in RFC 5890, RFC 5891, RFC 5892, RFC 5893 and // RFC 5894. pac...
Go
// Copyright 2010 The Go 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 dict implements the Dictionary Server Protocol // as defined in RFC 2229. package dict import ( "net/textproto" "strconv" "strings" ) // A Clie...
Go
// Copyright 2012 The Go 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 ipv4 import ( "syscall" ) func ipv4HeaderPrepend(fd int) (bool, error) { // TODO(mikio): Implement this return false, syscall.EPLAN9 } func setIP...
Go
// Copyright 2012 The Go 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 ipv4 import ( "errors" "fmt" "net" "runtime" "syscall" "unsafe" ) var ( errMissingAddress = errors.New("missing address") errMissingHeader ...
Go
// Copyright 2012 The Go 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 ipv4 import ( "syscall" ) func (c *genericOpt) sysfd() (int, error) { // TODO(mikio): Implement this return 0, syscall.EPLAN9 } func (c *dgramOpt...
Go
// Copyright 2012 The Go 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 darwin freebsd linux netbsd openbsd windows package ipv4 import ( "net" "syscall" ) // MulticastTTL returns the time-to-live field value for out...
Go
// Copyright 2012 The Go 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 ipv4 import ( "errors" "net" ) var ( errNoSuchInterface = errors.New("no such interface") errNoSuchMulticastInterface = errors.New("no s...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "syscall" "time" ) // A Conn represents a network endpoint that uses the IPv4 transport. // It is used to control basic IP-lev...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "os" "syscall" "unsafe" ) // Linux provides a convenient path control option IP_PKTINFO that // contains IP_SENDSRCADDR, IP_R...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "syscall" ) func (c *dgramOpt) MulticastTTL() (int, error) { // TODO(mikio): Implement this return 0, syscall.EPLAN9 } func ...
Go
// Copyright 2012 The Go 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 ipv4 import ( "syscall" ) func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { // TODO(mikio): Implement this return sysc...
Go
// Copyright 2012 The Go 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 darwin freebsd linux netbsd openbsd windows package ipv4 import ( "bytes" "net" "syscall" ) func setSyscallIPMreq(mreq *syscall.IPMreq, ifi *ne...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "os" "syscall" ) func ipv4ReceiveTOS(fd int) (bool, error) { v, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_IP, syscall....
Go
// Copyright 2012 The Go 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 darwin freebsd linux netbsd openbsd package ipv4 import ( "os" "syscall" ) func ipv4TOS(fd int) (int, error) { v, err := syscall.GetsockoptInt(...
Go
// Copyright 2012 The Go 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 ipv4 import ( "fmt" "net" "sync" ) type rawOpt struct { mu sync.Mutex cflags ControlFlags } func (o *rawOpt) lock() { o...
Go
// Copyright 2012 The Go 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 darwin freebsd netbsd openbsd package ipv4 import ( "net" "os" "syscall" ) func ipv4MulticastTTL(fd int) (int, error) { v, err := syscall.Gets...
Go
// Copyright 2012 The Go 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 darwin freebsd linux netbsd openbsd package ipv4 import ( "net" "reflect" ) func (c *genericOpt) sysfd() (int, error) { switch p := c.c.(type) ...
Go
// Copyright 2012 The Go 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 darwin freebsd netbsd openbsd package ipv4 import ( "net" "os" "syscall" "unsafe" ) func setControlMessage(fd int, opt *rawOpt, cf ControlFlag...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "reflect" "syscall" ) func (c *genericOpt) sysfd() (syscall.Handle, error) { switch p := c.c.(type) { case *net.TCPConn, *ne...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "syscall" ) // A payloadHandler represents the IPv4 datagram payload handler. type payloadHandler struct { c net.PacketConn r...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "syscall" ) // A packetHandler represents the IPv4 datagram handler. type packetHandler struct { c *net.IPConn rawOpt } func...
Go
// Copyright 2012 The Go 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 ipv4 import ( "os" "syscall" ) func ipv4SendSourceAddress(fd int) (bool, error) { v, err := syscall.GetsockoptInt(fd, syscall.IPPROTO_IP, syscall....
Go
// Copyright 2012 The Go 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 ipv4 import ( "syscall" ) func setControlMessage(fd syscall.Handle, opt *rawOpt, cf ControlFlags, on bool) error { // TODO(mikio): Implement this ...
Go
// Copyright 2012 The Go 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 ipv4 implements IP-level socket options for the Internet // Protocol version 4. // // The package provides IP-level socket options that allow // man...
Go
// Copyright 2012 The Go 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 darwin freebsd linux netbsd openbsd windows package ipv4 import ( "syscall" ) // TOS returns the type-of-service field value for outgoing packets...
Go
// Copyright 2012 The Go 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 ipv4 import ( "syscall" ) func (c *genericOpt) TOS() (int, error) { // TODO(mikio): Implement this return 0, syscall.EPLAN9 } func (c *genericOpt...
Go
// Copyright 2012 The Go 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 ipv4 import ( "net" "os" "syscall" "unsafe" ) // Please refer to the online manual; // http://msdn.microsoft.com/en-us/library/windows/desktop/ms...
Go
// Copyright 2011 The Go 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 proxy import ( "errors" "io" "net" "strconv" ) // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address // with an optional ...
Go
// Copyright 2011 The Go 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 proxy provides support for a variety of protocols to proxy network // data. package proxy import ( "errors" "net" "net/url" "os" ) // A Dialer ...
Go
// Copyright 2011 The Go 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 proxy import ( "net" ) type direct struct{} // Direct is a direct proxy: one that makes network connections directly. var Direct = direct{} func (d...
Go
// Copyright 2011 The Go 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 proxy import ( "net" "strings" ) // A PerHost directs connections to a default Dialer unless the hostname // requested matches one of a number of ex...
Go
// Copyright 2012 The Go 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 ignore package main // This program generates table.go and table_test.go. // Invoke as: // // go run gen.go -version "xxx" >table.go // go run...
Go
// Copyright 2012 The Go 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 publicsuffix provides a public suffix list based on data from // http://publicsuffix.org/. A public suffix is one under which Internet users // can d...
Go
// Copyright 2011 The Go 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 html import ( "code.google.com/p/go.net/html/atom" ) // A NodeType is the type of a Node. type NodeType uint32 const ( ErrorNode NodeType = iota T...
Go
// Copyright 2011 The Go 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 html import ( "strings" ) func adjustAttributeNames(aa []Attribute, nameMap map[string]string) { for i := range aa { if newName, ok := nameMap[aa[...
Go
// Copyright 2011 The Go 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 html import ( "bufio" "errors" "fmt" "io" "strings" ) type writer interface { io.Writer WriteByte(c byte) error // in Go 1.1, use io.ByteWriter...
Go
// Copyright 2011 The Go 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 html // Section 12.2.3.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". // http://www.whatwg...
Go
// Copyright 2010 The Go 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 html import ( "bytes" "io" "strconv" "strings" "code.google.com/p/go.net/html/atom" ) // A TokenType is the type of a Token. type TokenType uint...
Go
// Copyright 2011 The Go 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 html import ( "strings" ) // parseDoctype parses the data from a DoctypeToken into a name, // public identifier, and system identifier. It returns a ...
Go
// Copyright 2010 The Go 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 html import ( "bytes" "strings" "unicode/utf8" ) // These replacements permit compatibility with old numeric entities that // assumed Windows-1252 ...
Go
// Copyright 2010 The Go 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 html import ( "errors" "fmt" "io" "strings" a "code.google.com/p/go.net/html/atom" ) // A parser implements the HTML5 parsing algorithm: // http...
Go
// Copyright 2010 The Go 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 html // All entities that do not end with ';' are 6 or fewer bytes long. const longestEntityWithoutSemicolon = 6 // entity is a map from HTML entity n...
Go
// Copyright 2010 The Go 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 html implements an HTML5-compliant tokenizer and parser. Tokenization is done by creating a Tokenizer for an io.Reader r. It is the caller's respons...
Go
// Copyright 2012 The Go 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 atom provides integer codes (also known as atoms) for a fixed set of // frequently occurring HTML strings: tag names and attribute keys such as "p" /...
Go
// Copyright 2012 The Go 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 ignore package main // This program generates table.go and table_test.go. // Invoke as // // go run gen.go |gofmt >table.go // go run gen.go -test |...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA memory management on the driver level //#include <cuda.h> import "C" import ( "unsafe"...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA driver initialization //#include <cuda.h> import "C" import () // Initialize the CUDA ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA unified addressing. //#include <cuda.h> import "C" import ( "unsafe" ) // Make alloca...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA streams //#include <cuda.h> import "C" import "unsafe" import () type Stream uintptr ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements execution of CUDA kernels //#include <cuda.h> import "C" import ( "unsafe" ) // Launches a...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. // Go bindings for the CUDA driver API. package driver
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA memset functions. //#include <cuda.h> import "C" import ( "unsafe" ) // Sets the firs...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements manipulations on CUDA functions //#include <cuda.h> import "C" import ( "unsafe" ) // Repr...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements loading of CUDA ptx modules //#include <cuda.h> import "C" import ( "unsafe" ) // Represen...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA driver version management //#include <cuda.h> import "C" import () // Returns the CUDA ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA driver device management //#include <cuda.h> import "C" import () // CUDA Device numbe...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file provides access to CUDA driver error statuses (type CUresult). // CUDA error statuses are not returned b...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements CUDA driver context management //#include <cuda.h> import "C" import "unsafe" import () typ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package driver // This file implements "closures", wrappers around a cuda function + argument list + launch configuration. // The low...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package cufft //#include <cufft.h> import "C" import ( "fmt" ) // FFT type type Type int const ( R2C Type = C.CUFFT_R2C // Real ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. // Go bindings for the CUDA CUFFT API. package cufft
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package cufft //#include <cufft.h> import "C" import ( "unsafe" ) // FFT plan handle, reference type to a plan type Handle uintptr...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package cufft //#include <cufft.h> import "C" import ( "fmt" ) // CUFFT compatibility mode type CompatibilityMode int const ( CO...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package cufft //#include <cufft.h> import "C" import ( "fmt" ) // FFT result type Result int // FFT result value const ( SUCCESS...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements memory management. //#include <cuda_runtime.h> import "C" import "unsafe" import ( "reflec...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements low-level memory management. //#include <cuda_runtime.h> import "C" import "unsafe" import ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements safe(r) kernel execution control, // allowing kernels to be launced directly form go // (equi...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements device peer management. //#include <cuda_runtime.h> import "C" import () // Returns whethe...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements synchronization with the host //#include <cuda_runtime.h> import "C" import () // Blocks u...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements CUDA streams //#include <cuda_runtime.h> import "C" import "unsafe" import () type Stream ...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements low-level kernel execution control, // allowing kernels to be launced directly form go // (eq...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. //CUDA runtime bindings for Go. //-------------------- // //This package provides Go bindings for nVIDIA CUDA. //Access is provided to...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file provides access to CUDA error statuses. // CUDA error statuses are not returned by functions but checke...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements safe access to cuda memory. import () type Array interface { Pointer() uintptr Bytes() in...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime // This file implements device management. //#include <cuda_runtime.h> import "C" import ( "unsafe" "fmt" ) // R...
Go
// Copyright 2011 Arne Vansteenkiste (barnex@gmail.com). All rights reserved. // Use of this source code is governed by a freeBSD // license that can be found in the LICENSE.txt file. package runtime import ( "testing" "runtime" ) const SIZE = 1024 * 1024 func TestCopyEmptyArray(t *testing.T) { runtime.LockOSTh...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
// This file is part of MuMax, a high-performance micromagnetic simulator. // Copyright 2011 Arne Vansteenkiste and Ben Van de Wiele. // Use of this source code is governed by the GNU General Public License version 3 // (as published by the Free Software Foundation) that can be found in the license.txt file. // N...
Go
package queue import ( "flag" "fmt" ) var ( nodes []*Node queue []string //done chan(*Task) ) func init() { } func Main() { flag.Parse() setup() PrintInfo() } func PrintInfo() { PrintNodes() } func PrintNodes() { for _, n := range nodes { fmt.Println(n) } } func setup() { localhost := NewNode("...
Go
package queue import ( "fmt" ) type GPU struct { megabytes int busy bool } func NewGPU(megabytes int) *GPU { return &GPU{megabytes, false} } func (g *GPU) String() string { return fmt.Sprint(g.megabytes, "MB,", busyStr(g.busy)) } func busyStr(busy bool) string { if busy { return "busy" } return "fre...
Go
package queue import () type Task struct { command string }
Go