Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for simpleMakeTable (0.13 sec)

  1. src/hash/crc32/crc32_generic.go

    // table (8*256*4 bytes).
    
    package crc32
    
    import "internal/byteorder"
    
    // simpleMakeTable allocates and constructs a Table for the specified
    // polynomial. The table is suitable for use with the simple algorithm
    // (simpleUpdate).
    func simpleMakeTable(poly uint32) *Table {
    	t := new(Table)
    	simplePopulateTable(poly, t)
    	return t
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 22:36:41 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. src/hash/crc32/crc32.go

    var castagnoliTable8 *slicing8Table
    var updateCastagnoli func(crc uint32, p []byte) uint32
    var castagnoliOnce sync.Once
    var haveCastagnoli atomic.Bool
    
    func castagnoliInit() {
    	castagnoliTable = simpleMakeTable(Castagnoli)
    
    	if archAvailableCastagnoli() {
    		archInitCastagnoli()
    		updateCastagnoli = archUpdateCastagnoli
    	} else {
    		// Initialize the slicing-by-8 table.
    		castagnoliTable8 = slicingMakeTable(Castagnoli)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. src/hash/crc32/crc32_test.go

    		}
    	}
    }
    
    // TestSimple tests the simple generic algorithm.
    func TestSimple(t *testing.T) {
    	tab := simpleMakeTable(IEEE)
    	testGoldenIEEE(t, func(b []byte) uint32 {
    		return simpleUpdate(0, tab, b)
    	})
    
    	tab = simpleMakeTable(Castagnoli)
    	testGoldenCastagnoli(t, func(b []byte) uint32 {
    		return simpleUpdate(0, tab, b)
    	})
    }
    
    func TestGoldenMarshal(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
Back to top