Skip to content

Commit 0f6ee05

Browse files
committed
Add notes on float types
1 parent 806730c commit 0f6ee05

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ctorch.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,15 @@ void* torch_to_blob(const torch_tensor_t tensor, const torch_data_t dtype)
199199
break;
200200
case torch_kFloat16:
201201
std::cerr << "[WARNING]: float16 not supported" << std::endl;
202+
// NOTE: std::float16_t is available but only with C++23
202203
exit(EXIT_FAILURE);
203204
case torch_kFloat32:
204205
raw_ptr = (void*) t->data_ptr<float>();
206+
// NOTE: std::float32_t is available but only with C++23
205207
break;
206208
case torch_kFloat64:
207209
raw_ptr = (void*) t->data_ptr<double>();
210+
// NOTE: std::float64_t is available but only with C++23
208211
break;
209212
default:
210213
std::cerr << "[WARNING]: unknown data type" << std::endl;

0 commit comments

Comments
 (0)