-
Notifications
You must be signed in to change notification settings - Fork 63
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
Enable precompiled headers #122
base: ocl-open-80
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module cl12spir { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we re-use the existing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically yes, but we have the motivation to split out the common built-ins which doesn't relate to cl12/cl20 version, to reduce the duplication in generated pcm. So it's better we have a customized modulemap in our own repo. |
||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl20spir { | ||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl12spir64 { | ||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl20spir64 { | ||
header "opencl-c.h" | ||
export * | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module cl12spir { | ||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl20spir { | ||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl12spir64 { | ||
header "opencl-c.h" | ||
export * | ||
} | ||
module cl20spir64 { | ||
header "opencl-c.h" | ||
export * | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*****************************************************************************\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure we need this custom exception class, because we never throw it, do we? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We catch this in common_clang.cpp:346 as std::domain_error, do you mean this kind of exception will never be hit? |
||
Copyright (c) Intel Corporation (2009-2020). | ||
INTEL MAKES NO WARRANTY OF ANY KIND REGARDING THE CODE. THIS CODE IS | ||
LICENSED ON AN "AS IS" BASIS AND INTEL WILL NOT PROVIDE ANY SUPPORT, | ||
ASSISTANCE, INSTALLATION, TRAINING OR OTHER SERVICES. INTEL DOES NOT | ||
PROVIDE ANY UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY | ||
DISCLAIMS ANY WARRANTY OF MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR ANY | ||
PARTICULAR PURPOSE, OR ANY OTHER WARRANTY. Intel disclaims all liability, | ||
including liability for infringement of any proprietary rights, relating to | ||
use of the code. No license, express or implied, by estoppel or otherwise, | ||
to any intellectual property rights is granted herein. | ||
\file exceptions.h | ||
\*****************************************************************************/ | ||
|
||
#pragma once | ||
#include <stdexcept> | ||
|
||
/// macro for convenient definition of common clang exceptions | ||
#define DEFINE_COMMON_CLANG_EXCEPTION(__name) \ | ||
class __name : public std::domain_error { \ | ||
public: \ | ||
__name(const std::string &str) : std::domain_error(str) {} \ | ||
}; | ||
|
||
DEFINE_COMMON_CLANG_EXCEPTION(pch_error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why
opencl-c-base.h
is not here: it was added last year in llvm.org.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On release-80 branch, clang doesn't have opencl-c-base.h. In the pull request for ocl-open-90, 100, master branch, there is opencl-c-base.h.