Skip to content

Commit

Permalink
cpu: Remove pkg/cpu in favor of better klauspost/cpuid.
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshavardhana committed Feb 15, 2016
1 parent a173313 commit 9e10ee7
Show file tree
Hide file tree
Showing 24 changed files with 2,750 additions and 200 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ cyclo:
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/gocyclo -over 65 pkg

build: getdeps verifiers $(UI_ASSETS) isa-l
@GO15VENDOREXPERIMENT=1 go generate ./...
@GO15VENDOREXPERIMENT=1 go generate github.com/minio/minio/pkg/crypto/sha1

deadcode:
@GO15VENDOREXPERIMENT=1 ${GOPATH}/bin/deadcode
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

Minio is a distributed object storage server written in Golang. Source is available under free software / open source [Apache license 2.0](./LICENSE). API compatible with Amazon S3 cloud storage service.


## Description

Micro services environment provisions one Minio server per application instance. Scalability is achieved through large number of smaller personalized instances. This version of the Minio binary is built using Filesystem storage backend for magnetic and solid state disks.

Minio currently implements two backends

- Filesystem (FS) - is available and ready for general purpose use.
- ErasureCoded (XL) - is work in progress and not ready for general purpose use.

## Minio Client

[Minio Client (mc)](https://github.com/minio/mc#minio-client-mc-) provides a modern alternative to Unix commands like ``ls``, ``cat``, ``cp``, ``sync``, and ``diff``. It supports POSIX compatible filesystems and Amazon S3 compatible cloud storage systems. It is entirely written in Golang.
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build_script:
- curl -fsSL -o ui-assets.asc https://dl.minio.io/assets/server/ui/%UI_ASSETS_ARMOR%
- gpg --batch --no-tty --yes --keyserver pgp.mit.edu --recv-keys F9AAC728
- gpg --batch --no-tty --verify %UI_ASSETS_ARMOR% %UI_ASSETS%
- go generate ./...
- go generate github.com/minio/minio/pkg/crypto/sha1
- go test .
- go test -race .
- go test github.com/minio/minio/pkg...
Expand Down
39 changes: 0 additions & 39 deletions pkg/cpu/cpu_amd64.go

This file was deleted.

27 changes: 0 additions & 27 deletions pkg/cpu/cpu_amd64.s

This file was deleted.

32 changes: 0 additions & 32 deletions pkg/cpu/cpu_arm.go

This file was deleted.

76 changes: 0 additions & 76 deletions pkg/cpu/cpu_test.go

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/cpu/doc.go

This file was deleted.

4 changes: 2 additions & 2 deletions pkg/crypto/sha1/sha1block.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import "C"
import (
"unsafe"

"github.com/minio/minio/pkg/cpu"
"github.com/klauspost/cpuid"
)

func block(dig *digest, p []byte) {
switch true {
case cpu.HasSSE41() == true:
case cpuid.CPU.SSE3():
blockSSE3(dig, p)
default:
blockGeneric(dig, p)
Expand Down
6 changes: 3 additions & 3 deletions pkg/crypto/sha1/sha1block_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import "C"
import (
"unsafe"

"github.com/minio/minio/pkg/cpu"
"github.com/klauspost/cpuid"
)

func block(dig *digest, p []byte) {
switch true {
case cpu.HasAVX2():
case cpuid.CPU.AVX2():
blockAVX2(dig, p)
case cpu.HasSSE41():
case cpuid.CPU.SSE3():
blockSSE3(dig, p)
default:
blockGeneric(dig, p)
Expand Down
8 changes: 4 additions & 4 deletions pkg/crypto/sha256/sha256_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ package sha256
import (
"hash"

"github.com/minio/minio/pkg/cpu"
"github.com/klauspost/cpuid"
)

// Size - The size of a SHA256 checksum in bytes.
Expand Down Expand Up @@ -76,11 +76,11 @@ func (d *digest) Reset() {

func block(dig *digest, p []byte) {
switch true {
case cpu.HasAVX2() == true:
case cpuid.CPU.AVX2():
blockAVX2(dig, p)
case cpu.HasAVX() == true:
case cpuid.CPU.AVX():
blockAVX(dig, p)
case cpu.HasSSE41() == true:
case cpuid.CPU.SSSE3():
blockSSE(dig, p)
default:
blockGeneric(dig, p)
Expand Down
8 changes: 4 additions & 4 deletions pkg/crypto/sha512/sha512_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package sha512
import (
"hash"

"github.com/minio/minio/pkg/cpu"
"github.com/klauspost/cpuid"
)

// Size - The size of a SHA512 checksum in bytes.
Expand Down Expand Up @@ -47,11 +47,11 @@ type digest struct {

func block(dig *digest, p []byte) {
switch true {
case cpu.HasAVX2() == true:
case cpuid.CPU.AVX2():
blockAVX2(dig, p)
case cpu.HasAVX() == true:
case cpuid.CPU.AVX():
blockAVX(dig, p)
case cpu.HasSSE41() == true:
case cpuid.CPU.SSSE3():
blockSSE(dig, p)
default:
blockGeneric(dig, p)
Expand Down
22 changes: 22 additions & 0 deletions vendor/github.com/klauspost/cpuid/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9e10ee7

Please sign in to comment.