| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8146d91 commit a23c00b
144 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ include(CMakeParseArguments) | |||
| 28 | 28 | set(BIN2CPP_PROGRAM "bin2cpp") | |
| 29 | 29 | ||
| 30 | 30 | function(FILE_TO_STRING) | |
| 31 | - cmake_parse_arguments(RTCS "" "VARNAME;EXTENSION;OUTPUT_DIR;TARGETS;NAMESPACE;BINARY;NULLTERM" "SOURCES" ${ARGN}) | ||
| 31 | + cmake_parse_arguments(RTCS "WITH_EXTENSION;NULLTERM" "VARNAME;EXTENSION;OUTPUT_DIR;TARGETS;NAMESPACE;BINARY" "SOURCES" ${ARGN}) | ||
| 32 | 32 | ||
| 33 | 33 | set(_output_files "") | |
| 34 | 34 | foreach(_input_file ${RTCS_SOURCES}) | |
@@ -42,14 +42,18 @@ function(FILE_TO_STRING) | |||
| 42 | 42 | if(${RTCS_BINARY}) | |
| 43 | 43 | set(_binary "--binary") | |
| 44 | 44 | endif(${RTCS_BINARY}) | |
| 45 | - if(${RTCS_NULLTERM}) | ||
| 45 | + if(RTCS_NULLTERM) | ||
| 46 | 46 | set(_nullterm "--nullterm") | |
| 47 | - endif(${RTCS_NULLTERM}) | ||
| 47 | + endif(RTCS_NULLTERM) | ||
| 48 | 48 | ||
| 49 | 49 | string(REPLACE "." "_" var_name ${var_name}) | |
| 50 | 50 | ||
| 51 | 51 | set(_output_path "${CMAKE_CURRENT_BINARY_DIR}/${RTCS_OUTPUT_DIR}") | |
| 52 | - set(_output_file "${_output_path}/${_name_we}.${RTCS_EXTENSION}") | ||
| 52 | + if(RTCS_WITH_EXTENSION) | ||
| 53 | + set(_output_file "${_output_path}/${var_name}.${RTCS_EXTENSION}") | ||
| 54 | + else() | ||
| 55 | + set(_output_file "${_output_path}/${_name_we}.${RTCS_EXTENSION}") | ||
| 56 | + endif() | ||
| 53 | 57 | ||
| 54 | 58 | add_custom_command( | |
| 55 | 59 | OUTPUT ${_output_file} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -172,6 +172,17 @@ macro(arrayfire_set_cmake_default_variables) | |||
| 172 | 172 | if(APPLE) | |
| 173 | 173 | set(CMAKE_INSTALL_RPATH "/opt/arrayfire/lib") | |
| 174 | 174 | endif() | |
| 175 | + | ||
| 176 | + include(WriteCompilerDetectionHeader) | ||
| 177 | + write_compiler_detection_header( | ||
| 178 | + FILE ${ArrayFire_BINARY_DIR}/include/compiler_header.h | ||
| 179 | + PREFIX AF | ||
| 180 | + COMPILERS MSVC GNU Clang AppleClang Intel | ||
| 181 | + FEATURES cxx_constexpr cxx_relaxed_constexpr cxx_alignas cxx_thread_local | ||
| 182 | + #[VERSION <version>] | ||
| 183 | + #[PROLOG <prolog>] | ||
| 184 | + #[EPILOG <epilog>] | ||
| 185 | + ) | ||
| 175 | 186 | endmacro() | |
| 176 | 187 | ||
| 177 | 188 | mark_as_advanced( | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + The MIT License | ||
| 2 | + | ||
| 3 | + Copyright (c) 2012-2017 Christian Rau | ||
| 4 | + | ||
| 5 | + Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 6 | + of this software and associated documentation files (the "Software"), to deal | ||
| 7 | + in the Software without restriction, including without limitation the rights | ||
| 8 | + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 9 | + copies of the Software, and to permit persons to whom the Software is | ||
| 10 | + furnished to do so, subject to the following conditions: | ||
| 11 | + | ||
| 12 | + The above copyright notice and this permission notice shall be included in | ||
| 13 | + all copies or substantial portions of the Software. | ||
| 14 | + | ||
| 15 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| 21 | + THE SOFTWARE. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,6 +46,17 @@ floating point operations | |||
| 46 | 46 | ||
| 47 | 47 | =============================================================================== | |
| 48 | 48 | ||
| 49 | + \defgroup device_func_half isHalfAvailable | ||
| 50 | + \ingroup device_mat | ||
| 51 | + | ||
| 52 | + \brief Check if half(16-bit) precision floating point support is available for | ||
| 53 | + specified device | ||
| 54 | + | ||
| 55 | + These functions check if a device has support to perform half precision | ||
| 56 | + floating point operations | ||
| 57 | + | ||
| 58 | + =============================================================================== | ||
| 59 | + | ||
| 49 | 60 | \defgroup device_func_set setDevice | |
| 50 | 61 | \ingroup device_mat | |
| 51 | 62 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,6 @@ using namespace af; | |||
| 18 | 18 | static array A; // populated before each timing | |
| 19 | 19 | static void fn() { | |
| 20 | 20 | array B = matmul(A, A); // matrix multiply | |
| 21 | - B.eval(); // ensure evaluated | ||
| 22 | 21 | } | |
| 23 | 22 | ||
| 24 | 23 | int main(int argc, char** argv) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments