github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/null_amd64.go (about) 1 //go:build go1.18 && !purego 2 3 package parquet 4 5 import "github.com/segmentio/parquet-go/sparse" 6 7 //go:noescape 8 func nullIndex8(bits *uint64, rows sparse.Array) 9 10 //go:noescape 11 func nullIndex32(bits *uint64, rows sparse.Array) 12 13 //go:noescape 14 func nullIndex64(bits *uint64, rows sparse.Array) 15 16 //go:noescape 17 func nullIndex128(bits *uint64, rows sparse.Array) 18 19 func nullIndexBool(bits []uint64, rows sparse.Array) { 20 nullIndex8(&bits[0], rows) 21 } 22 23 func nullIndexInt(bits []uint64, rows sparse.Array) { 24 nullIndex64(&bits[0], rows) 25 } 26 27 func nullIndexInt32(bits []uint64, rows sparse.Array) { 28 nullIndex32(&bits[0], rows) 29 } 30 31 func nullIndexInt64(bits []uint64, rows sparse.Array) { 32 nullIndex64(&bits[0], rows) 33 } 34 35 func nullIndexUint(bits []uint64, rows sparse.Array) { 36 nullIndex64(&bits[0], rows) 37 } 38 39 func nullIndexUint32(bits []uint64, rows sparse.Array) { 40 nullIndex32(&bits[0], rows) 41 } 42 43 func nullIndexUint64(bits []uint64, rows sparse.Array) { 44 nullIndex64(&bits[0], rows) 45 } 46 47 func nullIndexUint128(bits []uint64, rows sparse.Array) { 48 nullIndex128(&bits[0], rows) 49 } 50 51 func nullIndexFloat32(bits []uint64, rows sparse.Array) { 52 nullIndex32(&bits[0], rows) 53 } 54 55 func nullIndexFloat64(bits []uint64, rows sparse.Array) { 56 nullIndex64(&bits[0], rows) 57 } 58 59 func nullIndexString(bits []uint64, rows sparse.Array) { 60 // We offset by an extra 8 bytes to test the lengths of string values where 61 // the first field is the pointer and the second is the length which we want 62 // to test. 63 nullIndex64(&bits[0], rows.Offset(8)) 64 } 65 66 func nullIndexSlice(bits []uint64, rows sparse.Array) { 67 // Slice values are null if their pointer is nil, which is held in the first 68 // 8 bytes of the object so we can simply test 64 bits words. 69 nullIndex64(&bits[0], rows) 70 } 71 72 func nullIndexPointer(bits []uint64, rows sparse.Array) { 73 nullIndex64(&bits[0], rows) 74 }