mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-11 01:04:33 +00:00
15 lines
287 B
Text
15 lines
287 B
Text
#version 450
|
|
|
|
#include "types.comp"
|
|
#include "generic_unary_head.comp"
|
|
|
|
void main() {
|
|
const uint idx = get_idx();
|
|
|
|
if (idx >= p.ne) {
|
|
return;
|
|
}
|
|
|
|
const FLOAT_TYPE val = FLOAT_TYPE(data_a[src0_idx(idx)]);
|
|
data_d[p.d_offset + dst_idx(idx)] = D_TYPE(sin(val));
|
|
}
|