Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for Alignment (0.16 sec)

  1. src/cmd/compile/internal/ssagen/pgen.go

    	// them altogether.
    	ap = a.Needzero()
    	bp = b.Needzero()
    	if ap != bp {
    		return ap
    	}
    
    	// Sort variables in descending alignment order, so we can optimally
    	// pack variables into the frame.
    	if a.Type().Alignment() != b.Type().Alignment() {
    		return a.Type().Alignment() > b.Type().Alignment()
    	}
    
    	// Sort normal variables before open-coded-defer slots, so that the
    	// latter are grouped together and near the top of the frame (to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/elfexec/elfexec.go

    func parseNotes(reader io.Reader, alignment int, order binary.ByteOrder) ([]elfNote, error) {
    	r := bufio.NewReader(reader)
    
    	// padding returns the number of bytes required to pad the given size to an
    	// alignment boundary.
    	padding := func(size int) int {
    		return ((size + (alignment - 1)) &^ (alignment - 1)) - size
    	}
    
    	var notes []elfNote
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/cmd/internal/obj/util.go

    // AlignmentPadding bytes to add to align code as requested.
    // Alignment is restricted to powers of 2 between 8 and 2048 inclusive.
    //
    // pc_: current offset in function, in bytes
    // p:  a PCALIGN or PCALIGNMAX prog
    // ctxt: the context, for current function
    // cursym: current function being assembled
    // returns number of bytes of padding needed,
    // updates minimum alignment for the function.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  4. src/internal/syscall/windows/syscall_windows.go

    	FileAttributes uint32
    
    	// Pad out to 8-byte alignment.
    	//
    	// Without this padding, TestChmod fails due to an argument validation error
    	// in SetFileInformationByHandle on windows/386.
    	//
    	// https://learn.microsoft.com/en-us/cpp/build/reference/zp-struct-member-alignment?view=msvc-170
    	// says that “The C/C++ headers in the Windows SDK assume the platform's
    	// default alignment is used.” What we see here is padding rather than
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  5. src/unsafe/unsafe.go

    //	e := unsafe.Pointer(uintptr(unsafe.Pointer(&x[0])) + i*unsafe.Sizeof(x[0]))
    //
    // It is valid both to add and to subtract offsets from a pointer in this way.
    // It is also valid to use &^ to round pointers, usually for alignment.
    // In all cases, the result must continue to point into the original allocated object.
    //
    // Unlike in C, it is not valid to advance a pointer just beyond the end of
    // its original allocation:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:45:20 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  6. src/reflect/abi.go

    		a.fregs++
    	}
    	return true
    }
    
    // stackAssign reserves space for one value that is "size" bytes
    // large with alignment "alignment" to the stack.
    //
    // Should not be called directly; use addArg instead.
    func (a *abiSeq) stackAssign(size, alignment uintptr) {
    	a.stackBytes = align(a.stackBytes, alignment)
    	a.steps = append(a.steps, abiStep{
    		kind:   abiStepStack,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  7. src/hash/crc32/crc32_test.go

    						benchmark(b, h, int64(size), int64(align))
    					})
    				}
    			})
    		}
    	}
    }
    
    func benchmark(b *testing.B, h hash.Hash32, n, alignment int64) {
    	b.SetBytes(n)
    	data := make([]byte, n+alignment)
    	data = data[alignment:]
    	for i := range data {
    		data[i] = byte(i)
    	}
    	in := make([]byte, 0, h.Size())
    
    	// Warm up
    	h.Reset()
    	h.Write(data)
    	h.Sum(in)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. src/internal/abi/type.go

    	Hash        uint32  // hash of type; avoids computation in hash tables
    	TFlag       TFlag   // extra type information flags
    	Align_      uint8   // alignment of variable with this type
    	FieldAlign_ uint8   // alignment of struct field with this type
    	Kind_       Kind    // enumeration for C
    	// function for comparing objects of this type
    	// (ptr to object A, ptr to object B) -> ==?
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/test/test.go

    } issue4054a;
    
    // issue 4339
    // We've historically permitted #include <>, so test it here.  Issue 29333.
    // Also see issue 41059.
    #include <issue4339.h>
    
    // issue 4417
    // cmd/cgo: bool alignment/padding issue.
    // bool alignment is wrong and causing wrong arguments when calling functions.
    static int c_bool(bool a, bool b, int c, bool d, bool e)  {
       return c;
    }
    
    // issue 4857
    #cgo CFLAGS: -Werror
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  10. tensorflow/c/tf_tensor.cc

              0) {
        // TF_STRING and TF_RESOURCE tensors have a different representation in
        // TF_Tensor than they do in tensorflow::Tensor. So a copy here is a waste
        // (any alignment requirements will be taken care of by TF_TensorToTensor
        // and TF_TensorFromTensor).
        //
        // Other types have the same representation, so copy only if it is safe to
        // do so.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 21:57:32 UTC 2024
    - 11.5K bytes
    - Viewed (0)
Back to top