code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2013 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 ipv6
type sysSockoptLen uint32
const (
sysSizeofPacketInfo = 0x14
sysSizeofMulticastReq = 0x14
sysSizeofICMPFilter = 0x20
)
type sysPacketInf... | Go |
// Copyright 2013 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 nacl plan9 windows
package ipv6
import (
"net"
"syscall"
)
// ReadFrom reads a payload of the received IPv6 datagram, from the
// endpoint c, co... | Go |
// Copyright 2013 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 ipv6
type sysICMPFilter struct {
Data [8]uint32
}
func (f *sysICMPFilter) set(typ ICMPType, block bool) {
if block {
f.Data[typ>>5] |= 1 << (uint... | Go |
// Copyright 2013 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 ipv6
type sysICMPFilter struct {
// TODO(mikio): Implement this
}
func (f *sysICMPFilter) set(typ ICMPType, block bool) {
// TODO(mikio): Implement... | Go |
// Copyright 2013 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 dragonfly freebsd linux netbsd openbsd
package ipv6
import (
"os"
"syscall"
"unsafe"
)
func ipv6ReceiveTrafficClass(fd int) (bool, error) {
v,... | Go |
// Copyright 2013 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 ipv6 implements IP-level socket options for the Internet
// Protocol version 6.
//
// The package provides IP-level socket options that allow
// man... | Go |
// Copyright 2013 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 dragonfly freebsd linux netbsd openbsd windows
package ipv6
import "syscall"
// TrafficClass returns the traffic class field value for outg... | Go |
// Copyright 2013 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 ipv6
import "sync"
// An ICMPType represents a type of ICMP message.
type ICMPType int
func (typ ICMPType) String() string {
s, ok := icmpTypes[typ... | Go |
// Copyright 2013 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 dragonfly freebsd linux netbsd openbsd
package ipv6
import (
"net"
"os"
"syscall"
"unsafe"
)
func ipv6TrafficClass(fd int) (int, error)... | Go |
// Copyright 2013 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
// This program generates internet protocol constants by reading IANA
// protocol registries.
//
// Usage:
// go run gentest.go > iana_test.g... | Go |
// Copyright 2014 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 context defines the Context type, which carries deadlines, cancellation
// signals, and other request-scoped values across API boundaries and between... | 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 2014 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"
const (
// See /usr/include/linux/in.h.
sysSockoptHeaderPrepend = syscall.IP_HDRINCL
sysSockoptTOS = 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 nacl plan9 solaris
package ipv4
func (c *genericOpt) sysfd() (int, error) {
// TODO(mikio): Implement this
return 0, errOpNoSupport
}
func (c *d... | Go |
// Copyright 2014 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 linux
package ipv4
import (
"syscall"
"unsafe"
)
func (cm *ControlMessage) marshalPacketInfo() (oob []byte) {
if l := cm.oobLen(); l > 0 ... | 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.
// +build darwin dragonfly freebsd linux netbsd openbsd
package ipv4
import (
"os"
"syscall"
)
func newControlMessage(opt *rawOpt) (oob []byte) {
opt.Loc... | 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 dragonfly freebsd linux netbsd openbsd windows
package ipv4
import (
"net"
"syscall"
)
// MulticastTTL returns the time-to-live field val... | Go |
// Copyright 2014 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"
const (
// See ws2tcpip.h.
sysSockoptHeaderPrepend = 0x2
sysSockoptTOS = syscall.IP_TOS
sysSockoptTTL ... | Go |
// Copyright 2014 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 dragonfly freebsd netbsd openbsd
package ipv4
import "syscall"
const (
// See /usr/include/netinet/in.h.
sysSockoptHeaderPrepend = sy... | Go |
// Copyright 2014 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 linux
package ipv4
import (
"net"
"os"
"syscall"
)
func joinIPv4Group(fd int, ifi *net.Interface, grp net.IP) error {
mreqn := syscall.IPMreqn{... | Go |
// Copyright 2014 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 init() {
// Seems like kern.osreldate is veiled on latest OS X. We use
// kern.osrelease instead.
osver, err := 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 nacl plan9 solaris
package ipv4
import "net"
func (c *dgramOpt) MulticastTTL() (int, error) {
// TODO(mikio): Implement this
return 0, errOpNoSu... | 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 nacl plan9 solaris
package ipv4
func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): Implement this
retu... | 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 (
errOpNoSupport = errors.New("operation not supported")
errNoSuchInterface = errors.New... | 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 (
"syscall"
"unsafe"
)
func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {
opt.Lock()
defer opt.Unlock()
i... | Go |
// Copyright 2014 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 init() {
freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate")
}
| Go |
// Copyright 2014 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,!linux
package ipv4
func (cm *ControlMessage) marshalPacketInfo() (oob []byte) {
return nil
}
| Go |
// Copyright 2013 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
// This program generates internet protocol constants and tables by
// reading IANA protocol registries.
//
// Usage of this program:
// go r... | Go |
// Copyright 2014 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 linux
package ipv4
import (
"os"
"syscall"
)
func ipv4PacketInfo(fd int) (bool, error) {
v, err := syscall.GetsockoptInt(fd, ianaProtocol... | 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 !plan9,!solaris,!windows
package ipv4
import (
"net"
"syscall"
)
// ReadFrom reads a payload of the received IPv4 datagram, from the
// endpoint... | 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, ianaProtocolIP, sysSockoptRe... | Go |
// Copyright 2014 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,!linux
package ipv4
func ipv4PacketInfo(fd int) (bool, error) {
return false, errOpNoSupport
}
func setIPv4PacketInfo(fd int, v bool) erro... | 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 dragonfly freebsd linux netbsd openbsd
package ipv4
import (
"os"
"syscall"
)
func ipv4TOS(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.
package ipv4
import (
"fmt"
"net"
"sync"
)
type rawOpt struct {
sync.Mutex
cflags ControlFlags
}
func (c *rawOpt) set(f ControlFlags) { c.cflags... | 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 dragonfly freebsd netbsd openbsd
package ipv4
import (
"net"
"os"
"syscall"
)
func ipv4MulticastTTL(fd int) (int, error) {
v, err := sy... | 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 dragonfly freebsd linux netbsd openbsd
package ipv4
import (
"net"
"reflect"
)
func (c *genericOpt) sysfd() (int, error) {
switch p := c... | 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 dragonfly freebsd netbsd openbsd
package ipv4
import (
"net"
"os"
"syscall"
)
func joinIPv4Group(fd int, ifi *net.Interface, grp net.IP)... | 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 nacl plan9 solaris
package ipv4
func ipv4HeaderPrepend(fd int) (bool, error) {
// TODO(mikio): Implement this
return false, errOpNoSupport
}
fun... | 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 nacl plan9 solaris
package ipv4
func (c *genericOpt) TOS() (int, error) {
// TODO(mikio): Implement this
return 0, errOpNoSupport
}
func (c *gen... | Go |
// Copyright 2014 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 dragonfly freebsd netbsd openbsd windows
package ipv4
import (
"net"
"syscall"
)
func setSysIPMreqInterface(mreq *syscall.IPMreq, ifi *net... | 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 dragonfly freebsd netbsd openbsd
package ipv4
import (
"net"
"syscall"
"unsafe"
)
func setControlMessage(fd int, opt *rawOpt, cf Control... | 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.Conn.(type) {
case *net.TCPConn, ... | 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"
// A payloadHandler represents the IPv4 datagram payload handler.
type payloadHandler struct {
net.PacketConn
rawOpt
}
func (c *... | 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 2014 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
// supportsPacketInfo reports whether the platform supports
// IP_PKTINFO.
var supportsPacketInfo bool
| 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 plan9 solaris windows
package ipv4
import (
"net"
"syscall"
)
// ReadFrom reads a payload of the received IPv4 datagram, from the
// endpoint c,... | 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
retur... | 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 dragonfly freebsd linux netbsd openbsd windows
package ipv4
import (
"syscall"
)
// TOS returns the type-of-service field value for outgoi... | Go |
// Copyright 2013 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
// An ICMPType represents a type of ICMP message.
type ICMPType int
func (typ ICMPType) String() string {
s, ok := icmpTypes[typ]
if !ok {
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"
"os"
"syscall"
"unsafe"
)
// Please refer to the online manual;
// http://msdn.microsoft.com/en-us/library/windows/desktop/ms... | Go |
// Copyright 2013 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
// This program generates internet protocol constants by reading IANA
// protocol registries.
//
// Usage:
// go run gentest.go > iana_test.g... | 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 2013 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 netutil provides network utility functions, complementing the more
// common ones in the net package.
package netutil
import (
"net"
"sync"
)
//... | 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 |
// Package charset provides common text encodings for HTML documents.
//
// The mapping from encoding labels to encodings is defined at
// http://encoding.spec.whatwg.org.
package charset
import (
"bytes"
"io"
"mime"
"strings"
"unicode/utf8"
"code.google.com/p/go.net/html"
"code.google.com/p/go.text/encoding"
... | Go |
// +build ignore
package main
// Download http://encoding.spec.whatwg.org/encodings.json and use it to
// generate table.go.
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
)
type enc struct {
Name string
Labels []string
}
type group struct {
Encodings []enc
Heading string
}
const specURL =... | 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"
"errors"
"io"
"strconv"
"strings"
"code.google.com/p/go.net/html/atom"
)
// A TokenType is the type of a Token.
type Toke... | 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 |
// 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 |
// 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
//#cgo LDFLAGS:-L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -L/usr/lib/nvidia/ -L/usr/lib64/nvidia/ -L/usr/lib64/nvidi... | 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.
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.
// 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 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.
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 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 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.
//#cgo LDFLAGS:-L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -L/usr/lib/n... | 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 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 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.
//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.
// Documentation was taken from the curand headers.
package curand
//#include <curand.h>
import "C"
import (
//"unsafe"
)
type Sta... | 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.
// Documentation was taken from the curand headers.
package curand
//#cgo LDFLAGS:-L/usr/local/cuda/lib -L/usr/local/cuda/lib64 ... | 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 CURAND API.
package curand
| 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.
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 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.