Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 689 for Perm (0.04 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_layout_helper.h

    // attributes besides `data_format` string.
    template <typename Op>
    LogicalResult UpdateDataFormat(StringRef data_format, Op *op) {
      auto perm = GetDataFormatPermutation(op->getDataFormat(), data_format);
      if (perm.empty()) return failure();
    
      // Update data format attribute.
      (*op)->setAttr("data_format", StringAttr::get(op->getContext(), data_format));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  2. src/cmd/go/internal/lockedfile/lockedfile_filelock.go

    )
    
    func openFile(name string, flag int, perm fs.FileMode) (*os.File, error) {
    	// On BSD systems, we could add the O_SHLOCK or O_EXLOCK flag to the OpenFile
    	// call instead of locking separately, but we have to support separate locking
    	// calls for Linux and Windows anyway, so it's simpler to use that approach
    	// consistently.
    
    	f, err := os.OpenFile(name, flag&^os.O_TRUNC, perm)
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  3. src/cmd/go/internal/lockedfile/lockedfile.go

    // If flag includes os.O_WRONLY or os.O_RDWR, the file is write-locked;
    // otherwise, it is read-locked.
    func OpenFile(name string, flag int, perm fs.FileMode) (*File, error) {
    	var (
    		f   = new(File)
    		err error
    	)
    	f.osFile.File, err = openFile(name, flag, perm)
    	if err != nil {
    		return nil, err
    	}
    
    	// Although the operating system will drop locks for open files when the go
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 5.1K bytes
    - Viewed (0)
  4. src/cmd/gofmt/gofmt.go

    		if *list {
    			fmt.Fprintln(r, filename)
    		}
    		if *write {
    			if info == nil {
    				panic("-w should not have been allowed with stdin")
    			}
    
    			perm := info.Mode().Perm()
    			if err := writeFile(filename, src, res, perm, info.Size()); err != nil {
    				return err
    			}
    		}
    		if *doDiff {
    			newName := filepath.ToSlash(filename)
    			oldName := newName + ".orig"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. cmd/os-instrumented.go

    }
    
    // OpenFile captures time taken to call os.OpenFile
    func OpenFile(name string, flag int, perm os.FileMode) (f *os.File, err error) {
    	switch flag & writeMode {
    	case writeMode:
    		defer updateOSMetrics(osMetricOpenFileW, name)(err)
    	default:
    		defer updateOSMetrics(osMetricOpenFileR, name)(err)
    	}
    	return os.OpenFile(name, flag, perm)
    }
    
    // Access captures time taken to call syscall.Access()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 15 01:09:38 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/rand/rand.go

    func Seed(seed int64) {
    	rng.Lock()
    	defer rng.Unlock()
    
    	rng.rand = rand.New(rand.NewSource(seed))
    }
    
    // Perm returns, as a slice of n ints, a pseudo-random permutation of the integers [0,n)
    // from the default Source.
    func Perm(n int) []int {
    	rng.Lock()
    	defer rng.Unlock()
    	return rng.rand.Perm(n)
    }
    
    const (
    	// We omit vowels from the set of available characters to reduce the chances
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 11 11:02:01 UTC 2018
    - 3.5K bytes
    - Viewed (0)
  7. internal/disk/directio_unsupported.go

    // https://github.com/openzfs/zfs/commit/a584ef26053065f486d46a7335bea222cb03eeea
    
    // OpenFileDirectIO wrapper around os.OpenFile nothing special
    func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
    	return os.OpenFile(filePath, flag, perm)
    }
    
    // DisableDirectIO is a no-op
    func DisableDirectIO(f *os.File) error {
    	return nil
    }
    
    // AlignedBlock simply returns an unaligned buffer
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  8. pkg/kubelet/nodeshutdown/storage.go

    }
    
    // atomicWrite atomically writes data to a file specified by filename.
    func atomicWrite(filename string, data []byte, perm os.FileMode) error {
    	f, err := os.CreateTemp(filepath.Dir(filename), ".tmp-"+filepath.Base(filename))
    	if err != nil {
    		return err
    	}
    	err = os.Chmod(f.Name(), perm)
    	if err != nil {
    		f.Close()
    		return err
    	}
    	n, err := f.Write(data)
    	if err != nil {
    		f.Close()
    		return err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  9. pkg/volume/util/subpath/subpath.go

    	// that's under user control. User must not be able to use symlinks to
    	// escape the volume to create directories somewhere else.
    	SafeMakeDir(subdir string, base string, perm os.FileMode) error
    }
    
    // Subpath defines the attributes of a subpath
    type Subpath struct {
    	// index of the VolumeMount for this container
    	VolumeMountIndex int
    
    	// Full path to the subpath directory on the host
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 27 02:59:53 UTC 2019
    - 3.3K bytes
    - Viewed (0)
  10. cmd/erasure-common.go

    )
    
    func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) {
    	disks := er.getDisks()
    	var wg sync.WaitGroup
    	var mu sync.Mutex
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    	for _, i := range r.Perm(len(disks)) {
    		i := i
    		wg.Add(1)
    		go func() {
    			defer wg.Done()
    			if disks[i] == nil {
    				return
    			}
    			di, err := disks[i].DiskInfo(context.Background(), DiskInfoOptions{})
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top