- [メイン] 共同研究のきっかけ作り
- 要素技術と応用をつなげたり
- アプリの人と数値線形代数の人をつなげたり
- 実装が好きな人と理論が好きな人をつなげたり
- こういう Nicholas HighamとJack Dongaraの組み合わせみたいなものが生まれると良いなーとか
- 要素技術と応用をつなげたり
- [おまけ] インターンや就活の情報交換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdexcept> | |
#include <sstream> | |
#include <cuda_device_runtime_api.h> | |
#include <cuda.h> | |
#define CUDA_CHECK_ERROR(status) cuda_error_check(status, __FILE__, __LINE__, __func__) | |
inline void cuda_error_check(const cudaError_t error, const std::string filename, const std::size_t line, const std::string funcname, const std::string message = ""){ | |
if(error != cudaSuccess){ | |
std::stringstream ss; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#include <stdexcept> | |
inline void cuda_check_error(cudaError_t error, const std::string filename, const std::size_t line, const std::string funcname, const std::string message = ""){ | |
if(error != cudaSuccess){ | |
std::stringstream ss; | |
ss << cudaGetErrorString( error ); | |
if(message.length() != 0){ | |
ss << " : " << message; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://en.wikipedia.org/wiki/Half-precision_floating-point_format | |
#include <cmath> | |
#include <iostream> | |
using half = std::uint16_t; | |
bool is_nan(const half a) { | |
return (((a >> 10) & 0x1f) == 0x1f) && (a & 0x3ff); | |
} |