mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 06:49:15 +00:00
Enable math defines for MSVC. (#3503)
The symbol M_PI is breaking the build on Windows. The _USE_MATH_DEFINES macro enables M_PI and other math constants on Windows. (I'm guessing this is more idomatic than the old trick of using PI=acos(-1.0).) https://learn.microsoft.com/en-us/cpp/c-runtime-library/math-constants?view=msvc-170 Co-authored-by: BradPepersAMD <Brad.Pepers@amd.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "ck/utility/common_header.hpp"
|
||||
#include "ck/library/utility/device_tensor_generator.hpp"
|
||||
#include "ck/utility/data_type.hpp"
|
||||
#define _USE_MATH_DEFINES // Required for M_PI in MSVC
|
||||
#include <cmath>
|
||||
|
||||
// use xorshift for now since it is simple. Should be suitable enough, but feel free to switch in
|
||||
|
||||
Reference in New Issue
Block a user