Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

Logical operation on vectors

$
0
0
I am trying to compile the following, simple kernel:

__kernel void foo() {
ulong2 l1 = (ulong2)(1UL, 1UL);
ulong2 l2 = (ulong2)(2UL, 2UL);
l1 && l2;
}

I'm using the following command to compile:

aoc -march=emulator -v <kernel_name> --board pcie385n_d5

, and I get the following error from the OpenCL parser:

invalid operands to binary expression ('ulong2' and 'ulong2')

I have noticed this with other logical operations, both unary and binary, and with other built-in scalar vector types.This is valid OpenCL according to the 1.0 specification. Looking at appendix A of the Altera OpenCL Programming Guide, there is no mention of restrictions placed on logical operations between scalar vectors. And this does compile correctly on other platforms (my CPU for example).

Is this an existing limitation that I missed or an oversight?

aoc --version:
Altera SDK for OpenCL, 64-Bit Offline Compiler
Version 14.0 Build 200

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>