summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2019-05-06 09:58:36 +0200
committerGitHub <noreply@github.com>2019-05-06 09:58:36 +0200
commit774cebaa404080ea725cc57b7a433d891e85d8a2 (patch)
tree6b2de43f52182346c9739b270aee0beed17a341e
parent7084311e454f312094195df06fba12996e64fb05 (diff)
parentcf4907942c5573a446321129338fe9aff63535d1 (diff)
Merge pull request #356 from umar456/osx_assert
Remove assert for extention not available in macOS
-rw-r--r--src/clpp11.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/clpp11.hpp b/src/clpp11.hpp
index 94464990..786f7dbb 100644
--- a/src/clpp11.hpp
+++ b/src/clpp11.hpp
@@ -18,13 +18,13 @@
// =================================================================================================
//
// Copyright 2015 SURFsara
-//
+//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -358,8 +358,10 @@ class Device {
// Returns if the Nvidia chip is a Volta or later archicture (sm_70 or higher)
bool IsPostNVIDIAVolta() const {
- assert(HasExtension("cl_nv_device_attribute_query"));
- return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
+ if(HasExtension("cl_nv_device_attribute_query")) {
+ return GetInfo<cl_uint>(CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV) >= 7;
+ }
+ return false;
}
// Retrieves the above extra information (if present)