Simd::Avx512 - Emulate SIMD instructions
Help needed please!
Emulate SIMD instructions
Version 20210121.
The following sections describe the methods in each functional area of this module. For an alphabetic listing of all methods by name see Index.
Emulation of Avx512 instructions
Packed Shift Left Logical DoubleQword
Parameter Description 1 $xmm1 Bytes 2 $imm8 Length of shift
Example:
is_deeply PSLLDQ(repeat("$b55$b33", 8), 1), repeat(repeat("$b33$b55", 7)."$b33$b00", 1); # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲
is_deeply VPSLLDQ(repeat("$b55$b33", 16), 1), repeat(repeat("$b33$b55", 7)."$b33$b00", 2); # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲
Packed Shift Right Logical DoubleQword
is_deeply PSRLDQ(repeat("$b55$b33", 8), 1), repeat("$b00$b55".repeat("$b33$b55", 7), 1); # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲
is_deeply VPSRLDQ(repeat("$b55$b33", 16), 1), repeat("$b00$b55".repeat("$b33$b55", 7), 2); # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲
Packed CoMPare EQual Byte
Parameter Description 1 $xmm1 Bytes 2 $xmm2 Bytes
is_deeply PCMPEQB(repeat("$b00$b01$b02$b03", 4), # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 repeat("$b06$b05$b04$b03", 4)), repeat("$b00$b00$b00$bff", 4);
Packed CoMPare EQual Byte with optional masking
Parameter Description 1 $k2 Optional input mask 2 $xmm1 Bytes 3 $xmm2 Bytes
is_deeply VPCMPEQB(repeat("$b00$b01$b02$b03", 8), # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 repeat("$b06$b05$b04$b03", 8)), repeat("$b00$b00$b00$bff", 8); is_deeply VPCMPEQB( # 128 # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 #Q0 1 2 3 4 5 6 7 8 #D0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #W0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #B0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #b012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345678 '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0', '00000001000010000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '10000001000010000000000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', ), '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0';
Packed CoMPare Unsigned Byte
Parameter Description 1 $k2 Input mask 2 $xmm1 Bytes 3 $xmm2 Bytes 4 $op Test code
is_deeply VPCMPUB( # 256 # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 #Q0 1 2 3 4 5 6 7 8 #D0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #W0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #B0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #b012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345678 '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0', '0000000100001000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '1000000100001000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 0), '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'; is_deeply VPCMPUB( # 512 # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲 #Q0 1 2 3 4 5 6 7 8 #D0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #W0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #B0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 #b012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345670123456701234567012345678 '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0', '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100001000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000100001000000000001100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', 0), '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '1'. '1'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0'. '0';
1 PCMPEQB - Packed CoMPare EQual Byte
2 PSLLDQ - Packed Shift Left Logical DoubleQword
3 PSRLDQ - Packed Shift Right Logical DoubleQword
4 VPCMPEQB - Packed CoMPare EQual Byte with optional masking
5 VPCMPUB - Packed CoMPare Unsigned Byte
6 VPSLLDQ - Packed Shift Left Logical DoubleQword
7 VPSRLDQ - Packed Shift Right Logical DoubleQword
This module is written in 100% Pure Perl and, thus, it is easy to read, comprehend, use, modify and install via cpan:
sudo cpan install Simd::Avx512
philiprbrenan@gmail.com
http://www.appaapps.com
Copyright (c) 2016-2019 Philip R Brenan.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
To install Simd::Avx512, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Simd::Avx512
CPAN shell
perl -MCPAN -e shell install Simd::Avx512
For more information on module installation, please visit the detailed CPAN module installation guide.