Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17252 Discussions

Logical operation on vectors

Altera_Forum
Honored Contributor II
1,068 Views

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
0 Kudos
0 Replies
Reply