FreeBSD/sys/cddl/boot/zfs/zfssubr.c
/*
 * Multiply a given number by 2 raised to the given power.
 */
Multiply a given number by 2 raised to the given power.
Multiply a given number by 2 raised to the given power .
static uint8_t
vdev_raidz_exp2(uint8_t a, int exp)
{
	if (a == 0)
		return (0);
	ASSERT(exp >= 0);
	ASSERT(vdev_raidz_log2[a] > 0 || a == 1);
	exp += vdev_raidz_log2[a];
	if (exp > 255)
		exp -= 255;
	return (vdev_raidz_pow2[exp]);
}
static uint8_t vdev_raidz_exp2 ( uint8_t a , int exp ) { if ( a == 0 ) return ( 0 ) ; ASSERT ( exp >= 0 ) ; ASSERT ( vdev_raidz_log2 [ a ] > 0 || a == 1 ) ; exp += vdev_raidz_log2 [ a ] ; if ( exp > 255 ) exp -= 255 ; return ( vdev_raidz_pow2 [ exp ] ) ; }
Multiply a given number by 2 raised to the given power.
Multiply a given number by 2 raised to the given power .