MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / scale_data

Method scale_data

src/tests/buffer.h:1160–1190  ·  view source on GitHub ↗

/

Source from the content-addressed store, hash-verified

1158
1159 /*****************************************************/
1160 void scale_data( T scale) {
1161 // for all batches
1162
1163 for( size_t batch = 0; batch < batch_size(); batch++ )
1164 {
1165 for( size_t z = 0; z < length(dimz); z++ )
1166 {
1167 for( size_t y = 0; y < length(dimy); y++ )
1168 {
1169 for( size_t x = 0; x < length(dimx); x++ )
1170 {
1171 if( is_real() )
1172 {
1173 T this_value = real(x, y, z, batch);
1174 T scaled_value = this_value * scale;
1175 set_one_data_point( scaled_value, x, y, z, batch );
1176 }
1177 else
1178 {
1179 T this_real = real(x, y, z, batch);
1180 T this_imag = imag(x, y, z, batch);
1181
1182 T scaled_real = this_real * scale;
1183 T scaled_imag = this_imag * scale;
1184 set_one_data_point( scaled_real, scaled_imag, x, y, z, batch );
1185 }
1186 }
1187 }
1188 }
1189 }
1190 }
1191
1192 /*****************************************************/
1193 void make_sure_padding_was_not_overwritten()

Callers 1

transformMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected