Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 689 for Perm (0.16 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/rand/rand_test.go

    		}
    	}
    }
    
    func TestPerm(t *testing.T) {
    	Seed(5)
    	rand.Seed(5)
    	for i := 1; i < 20; i++ {
    		actual := Perm(i)
    		expected := rand.Perm(i)
    		for j := 0; j < i; j++ {
    			if actual[j] != expected[j] {
    				t.Errorf("Perm call result is unexpected")
    			}
    		}
    	}
    }
    
    func TestIntnRange(t *testing.T) {
    	// 0 is invalid.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 07 13:45:36 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  2. pkg/file/file.go

    		return err
    	}
    	defer in.Close()
    
    	perm, err := in.Stat()
    	if err != nil {
    		return err
    	}
    
    	return AtomicWriteReader(filepath.Join(targetDir, targetFilename), in, perm.Mode())
    }
    
    func Copy(srcFilepath, targetDir, targetFilename string) error {
    	in, err := os.Open(srcFilepath)
    	if err != nil {
    		return err
    	}
    	defer in.Close()
    
    	perm, err := in.Stat()
    	if err != nil {
    		return err
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 11 21:42:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  3. internal/lock/lock_windows.go

    	errLockViolation syscall.Errno = 0x21
    )
    
    // lockedOpenFile is an internal function.
    func lockedOpenFile(path string, flag int, perm os.FileMode, lockType uint32) (*LockedFile, error) {
    	f, err := Open(path, flag, perm)
    	if err != nil {
    		return nil, err
    	}
    
    	if err = lockFile(syscall.Handle(f.Fd()), lockType); err != nil {
    		f.Close()
    		return nil, err
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  4. pkg/util/filesystem/defaultfs.go

    }
    
    // MkdirAll via os.MkdirAll
    func (fs *DefaultFs) MkdirAll(path string, perm os.FileMode) error {
    	return os.MkdirAll(fs.prefix(path), perm)
    }
    
    // MkdirAllWithPathCheck checks if path exists already. If not, it creates a directory
    // named path, along with any necessary parents, and returns nil, or else returns an error.
    // Permission bits perm (before umask) are used for all directories that
    // MkdirAllWithPathCheck creates.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 03 07:38:14 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. src/internal/syscall/unix/at.go

    		return errno
    	}
    
    	return nil
    }
    
    func Openat(dirfd int, path string, flags int, perm uint32) (int, error) {
    	p, err := syscall.BytePtrFromString(path)
    	if err != nil {
    		return 0, err
    	}
    
    	fd, _, errno := syscall.Syscall6(openatTrap, uintptr(dirfd), uintptr(unsafe.Pointer(p)), uintptr(flags), uintptr(perm), 0, 0)
    	if errno != 0 {
    		return 0, errno
    	}
    
    	return int(fd), nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 19 15:51:18 UTC 2022
    - 917 bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_patterns.td

    def ReorderTransposeDequantQuant :
          Pat<(TF_TransposeOp:$old_value
                  (TFL_DequantizeOp (TFL_QuantizeOp $input, $qtype)), $perm),
              (TFL_DequantizeOp (TFL_QuantizeOp
                                    (TF_TransposeOp $input, $perm),
                                    (UpdateShapeWithAxis<-1> $qtype, $old_value))),
              [(CanUpdateShapeWithAxis<-1> $qtype, $old_value)]>;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. pkg/kubelet/container/testing/os.go

    	Removes    []string
    	Files      map[string][]*os.FileInfo
    	FilesLock  sync.RWMutex
    }
    
    // Mkdir is a fake call that just returns nil.
    func (f *FakeOS) MkdirAll(path string, perm os.FileMode) error {
    	if f.MkdirAllFn != nil {
    		return f.MkdirAllFn(path, perm)
    	}
    	return nil
    }
    
    // Symlink is a fake call that just returns nil.
    func (f *FakeOS) Symlink(oldname string, newname string) error {
    	if f.SymlinkFn != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 07 13:37:31 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. src/os/file_open_wasip1.go

    // license that can be found in the LICENSE file.
    
    //go:build wasip1
    
    package os
    
    import (
    	"internal/poll"
    	"syscall"
    )
    
    func open(filePath string, flag int, perm uint32) (int, poll.SysFile, error) {
    	if filePath == "" {
    		return -1, poll.SysFile{}, syscall.EINVAL
    	}
    	absPath := filePath
    	// os.(*File).Chdir is emulated by setting the working directory to the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 818 bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

              tpose_arg_rank == 0)) {
          return failure();
        }
    
        auto perm = llvm::dyn_cast_or_null<arith::ConstantOp>(
            tpose_arg.getPerm().getDefiningOp());
        if (!perm) {
          return failure();
        }
        auto perm_value =
            llvm::dyn_cast<DenseElementsAttr>(perm.getValue()).getValues<int32_t>();
        llvm::SmallVector<int32_t> perm_arr(perm_value.begin(), perm_value.end());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo_patterns.td

      "CreateCastToInt32($0, $_loc, $_builder)">;
    // TODO: b/304003568 - Add TF_TransposeOp folding logic to tflite.
    def LegalizeTranspose : Pat<(MHLO_TransposeOp $arg, $perm),
                                (TFL_TransposeOp $arg,
                                (CreateTFLCastToInt32Op (TFL_ConstOp $perm)))>;
    
    
    def ConvertDotGeneralOp : NativeCodeCall<"ConvertDotGeneralOp($_builder, "
                                                   "$0.getDefiningOp())">;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 18 18:07:41 UTC 2023
    - 1.6K bytes
    - Viewed (0)
Back to top