Updated to use cpp raw literal strings
This commit is contained in:
parent
c15a14d2b2
commit
1449c858ee
8 changed files with 34 additions and 33 deletions
|
|
@ -71,6 +71,7 @@ TEST(LogisticRegressionAlgorithm, TestMainLogisticRegression) {
|
|||
// * wi < 0.01
|
||||
// * wj > 1.0
|
||||
// * b < 0
|
||||
// TODO: Add EXPECT_DOUBLE_EQ instead
|
||||
EXPECT_LT(wIn->data()[0], 0.01);
|
||||
EXPECT_GT(wIn->data()[1], 1.0);
|
||||
EXPECT_LT(bIn->data()[0], 0.0);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ int main(int argc, char *argv[]) {
|
|||
|
||||
#if KOMPUTE_ENABLE_SPDLOG
|
||||
spdlog::set_level(static_cast<spdlog::level::level_enum>(SPDLOG_ACTIVE_LEVEL));
|
||||
spdlog::error("default active level {}", SPDLOG_ACTIVE_LEVEL);
|
||||
#endif
|
||||
|
||||
return RUN_ALL_TESTS();
|
||||
|
|
|
|||
|
|
@ -12,17 +12,17 @@ TEST(TestOpAlgoBase, ShaderRawDataFromConstructor) {
|
|||
std::shared_ptr<kp::Tensor> tensorB{ new kp::Tensor({ 0, 0, 0 })};
|
||||
mgr.evalOpDefault<kp::OpCreateTensor>({ tensorA, tensorB });
|
||||
|
||||
std::string shader(
|
||||
"#version 450\n"
|
||||
"layout (local_size_x = 1) in;\n"
|
||||
"layout(set = 0, binding = 0) buffer a { float pa[]; };\n"
|
||||
"layout(set = 0, binding = 1) buffer b { float pb[]; };\n"
|
||||
"void main() {\n"
|
||||
" uint index = gl_GlobalInvocationID.x;\n"
|
||||
" pb[index] = pa[index];\n"
|
||||
" pa[index] = index;\n"
|
||||
"}\n"
|
||||
);
|
||||
std::string shader(R"(
|
||||
#version 450
|
||||
layout (local_size_x = 1) in;
|
||||
layout(set = 0, binding = 0) buffer a { float pa[]; };
|
||||
layout(set = 0, binding = 1) buffer b { float pb[]; };
|
||||
void main() {
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
pb[index] = pa[index];
|
||||
pa[index] = index;
|
||||
}
|
||||
)");
|
||||
|
||||
mgr.evalOpDefault<kp::OpAlgoBase<>>(
|
||||
{ tensorA, tensorB },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue