Skip to content

Example failure - AVX512F/VL intrinsic support? #33

Open
@zbjornson

Description

@zbjornson

Hi folks, cool project!

I was trying out a few of my code snippets but can't seem to get them to work. Here's an example:

#include <x86intrin.h>

__m512 huge = _mm512_set1_pd(2);
__m512 tiny = _mm512_set1_pd(-2);
__m512 one = _mm512_set1_pd(1.0);

void sgm(__m512& prodv, __m512& scales, __m512 const incoming) {
	prodv = _mm512_mul_pd(prodv, incoming);
	auto pgeh = _mm512_cmp_pd_mask(prodv, huge, _CMP_GE_OQ);
	auto plet = _mm512_cmp_pd_mask(prodv, tiny, _CMP_LE_OQ);
	prodv = _mm512_mask_mul_pd(prodv, pgeh, prodv, tiny);
	prodv = _mm512_mask_mul_pd(prodv, plet, prodv, huge);
	scales = _mm512_mask_add_epi64(scales, pgeh, scales, one);
	scales = _mm512_mask_sub_epi64(scales, plet, scales, one);
}

Removing the & in the parameter list and making it return prodv gets it a bit further, but not much. All of the instructions are reported as "unsupported command".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions