Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.3 #590

Merged
merged 21 commits into from
Jun 1, 2022
Merged

v1.3 #590

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b055fbb
[Build] Add a script to configure the CMake build. (#556)
kris-rowe Mar 23, 2022
898951d
Enable the CI pipeline for the development branch. (#568)
kris-rowe Mar 29, 2022
34feb59
Issue 565 (#569)
kris-rowe Mar 29, 2022
b5942a6
Replace `tls` class template with C++ `thread_local` keyword (#571)
kris-rowe Apr 12, 2022
7f7b470
Feature ocl device functions (#576)
kris-rowe Apr 13, 2022
2c576fa
Correctly detect last inner block when adding barriers (#579)
noelchalmers May 3, 2022
9b47900
Patch primitive bitwise ops (#581)
kris-rowe May 10, 2022
e22fdae
Add modulefile to configure environment variables. (#580)
kris-rowe May 10, 2022
0d06a5d
Enable math functions (#577)
kris-rowe May 17, 2022
7f5a3c6
OpenCL and DPCPP kernel hashing (#583)
kris-rowe May 18, 2022
70aa7df
[JSON] Fix a json constructor not setting the type (#586)
noelchalmers May 20, 2022
c8a6b7d
Compile directly to cubin instead of ptx since OCCA handles jitting. …
kris-rowe May 23, 2022
81ab4c6
Update README and install guide match community refresh branch. (#588)
kris-rowe May 27, 2022
693106c
Update naming used in CMake package files. (#589)
kris-rowe May 27, 2022
80cd567
Allow the definition of `SYCL_ROOT` to be passed to cmake directly.
kris-rowe May 31, 2022
34a712a
Disable MPI by default.
kris-rowe May 31, 2022
4478ca6
Clean-up CMake configure script.
kris-rowe May 31, 2022
5ad968c
Spelling, grammar.
kris-rowe May 31, 2022
fb1cf8f
Add info about OCCA CLI.
kris-rowe May 31, 2022
8a63c90
Update copyright dates.
kris-rowe May 31, 2022
70c05e9
Fix prepending of qualifiers (addFirst) (#591)
SFrijters Jun 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Patch primitive bitwise ops (#581)
  • Loading branch information
kris-rowe authored May 10, 2022
commit 9b47900aa105aa227581925e27573825f83269a4
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
- name: Run CTests
if: ${{ matrix.useCMake && !matrix.useoneAPI }}
run: |
ctest --test-dir build --progress --output-on-failure --parallel 8 --schedule-random -E "examples_cpp_arrays-opencl|examples_cpp_generic_inline_kernel-opencl|examples_cpp_shared_memory-opencl|examples_cpp_shared_memory-dpcpp|examples_cpp_nonblocking_streams-dpcpp"
ctest --test-dir build --progress --output-on-failure --parallel 8 --schedule-random -E "examples_cpp_arrays-opencl|examples_cpp_for_loops-opencl|examples_cpp_generic_inline_kernel-opencl|examples_cpp_shared_memory-opencl|examples_cpp_shared_memory-dpcpp|examples_cpp_nonblocking_streams-dpcpp|examples_cpp_for_loops-dpcpp|examples_cpp_arrays-dpcpp"


- name: Run CTests
Expand All @@ -176,7 +176,7 @@ jobs:
run: |
source /opt/intel/oneapi/setvars.sh
export SYCL_DEVICE_FILTER=opencl.cpu
ctest --test-dir build --progress --output-on-failure --parallel 8 --schedule-random -E "examples_cpp_arrays-opencl|examples_cpp_generic_inline_kernel-opencl|examples_cpp_shared_memory-opencl|examples_cpp_shared_memory-dpcpp|examples_cpp_nonblocking_streams-dpcpp"
ctest --test-dir build --progress --output-on-failure --parallel 8 --schedule-random -E "examples_cpp_arrays-opencl|examples_cpp_for_loops-opencl|examples_cpp_generic_inline_kernel-opencl|examples_cpp_shared_memory-opencl|examples_cpp_shared_memory-dpcpp|examples_cpp_nonblocking_streams-dpcpp|examples_cpp_for_loops-dpcpp|examples_cpp_arrays-dpcpp"

- name: Upload code coverage
if: ${{ matrix.OCCA_COVERAGE }}
Expand Down
24 changes: 12 additions & 12 deletions src/types/primitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ namespace occa {
primitive primitive::bitAnd(const primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : return primitive(a.to<bool>() & b.to<bool>());
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator & to bool type"); break;
case primitiveType::int8_ : return primitive(a.to<int8_t>() & b.to<int8_t>());
case primitiveType::uint8_ : return primitive(a.to<uint8_t>() & b.to<uint8_t>());
case primitiveType::int16_ : return primitive(a.to<int16_t>() & b.to<int16_t>());
Expand All @@ -709,7 +709,7 @@ namespace occa {
primitive primitive::bitOr(const primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : return primitive(a.to<bool>() | b.to<bool>());
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator | to bool type"); break;
case primitiveType::int8_ : return primitive(a.to<int8_t>() | b.to<int8_t>());
case primitiveType::uint8_ : return primitive(a.to<uint8_t>() | b.to<uint8_t>());
case primitiveType::int16_ : return primitive(a.to<int16_t>() | b.to<int16_t>());
Expand All @@ -728,7 +728,7 @@ namespace occa {
primitive primitive::xor_(const primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : return primitive(a.to<bool>() ^ b.to<bool>());
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to bool type"); break;
case primitiveType::int8_ : return primitive(a.to<int8_t>() ^ b.to<int8_t>());
case primitiveType::uint8_ : return primitive(a.to<uint8_t>() ^ b.to<uint8_t>());
case primitiveType::int16_ : return primitive(a.to<int16_t>() ^ b.to<int16_t>());
Expand Down Expand Up @@ -888,7 +888,7 @@ namespace occa {
primitive& primitive::bitAndEq(primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : a = (a.to<bool>() & b.to<bool>()); break;
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator &= to bool type"); break;
case primitiveType::int8_ : a = (a.to<int8_t>() & b.to<int8_t>()); break;
case primitiveType::uint8_ : a = (a.to<uint8_t>() & b.to<uint8_t>()); break;
case primitiveType::int16_ : a = (a.to<int16_t>() & b.to<int16_t>()); break;
Expand All @@ -897,8 +897,8 @@ namespace occa {
case primitiveType::uint32_ : a = (a.to<uint32_t>() & b.to<uint32_t>()); break;
case primitiveType::int64_ : a = (a.to<int64_t>() & b.to<int64_t>()); break;
case primitiveType::uint64_ : a = (a.to<uint64_t>() & b.to<uint64_t>()); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator & to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator & to double type"); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator &= to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator &= to double type"); break;
default: ;
}
return a;
Expand All @@ -907,7 +907,7 @@ namespace occa {
primitive& primitive::bitOrEq(primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : a = (a.to<bool>() | b.to<bool>()); break;
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator |= to bool type"); break;
case primitiveType::int8_ : a = (a.to<int8_t>() | b.to<int8_t>()); break;
case primitiveType::uint8_ : a = (a.to<uint8_t>() | b.to<uint8_t>()); break;
case primitiveType::int16_ : a = (a.to<int16_t>() | b.to<int16_t>()); break;
Expand All @@ -916,8 +916,8 @@ namespace occa {
case primitiveType::uint32_ : a = (a.to<uint32_t>() | b.to<uint32_t>()); break;
case primitiveType::int64_ : a = (a.to<int64_t>() | b.to<int64_t>()); break;
case primitiveType::uint64_ : a = (a.to<uint64_t>() | b.to<uint64_t>()); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator | to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator | to double type"); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator |= to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator |= to double type"); break;
default: ;
}
return a;
Expand All @@ -926,7 +926,7 @@ namespace occa {
primitive& primitive::xorEq(primitive &a, const primitive &b) {
const int retType = (a.type > b.type) ? a.type : b.type;
switch(retType) {
case primitiveType::bool_ : a = (a.to<bool>() ^ b.to<bool>()); break;
case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator ^= to bool type"); break;
case primitiveType::int8_ : a = (a.to<int8_t>() ^ b.to<int8_t>()); break;
case primitiveType::uint8_ : a = (a.to<uint8_t>() ^ b.to<uint8_t>()); break;
case primitiveType::int16_ : a = (a.to<int16_t>() ^ b.to<int16_t>()); break;
Expand All @@ -935,8 +935,8 @@ namespace occa {
case primitiveType::uint32_ : a = (a.to<uint32_t>() ^ b.to<uint32_t>()); break;
case primitiveType::int64_ : a = (a.to<int64_t>() ^ b.to<int64_t>()); break;
case primitiveType::uint64_ : a = (a.to<uint64_t>() ^ b.to<uint64_t>()); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to double type"); break;
case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ^= to float type"); break;
case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ^= to double type"); break;
default: ;
}
return a;
Expand Down
Loading