#include <sys/time.h>
#include <iostream>
int main() {
struct timeval cur_time;
gettimeofday(&cur_time, NULL);
std::cout << "Current time since January 1, 1970: "
<< cur_time.tv_sec * 1000 + cur_time.tv_usec
<< " ms" << std::endl;
return 0;
}
#include <sys/time.h>
#include <iostream>
int main() {
struct timeval cur_time;
gettimeofday(&cur_time, NULL);
std::cout << "Current time since January 1, 1970: "
<< cur_time.tv_sec * 1000 + cur_time.tv_usec
<< " ms" << std::endl;
return 0;
}
블루투스 동글
컴퓨터 청소
차전자피
안약
./nbody -benchmark -numbodies=2560000 -device=0
> Windowed mode
> Simulation data stored in video memory
> Single precision floating point simulation
> 1 Devices used for simulation
gpuDeviceInit() CUDA Device [0]: "Ampere
> Compute 8.6 CUDA device: [NVIDIA GeForce RTX 3090]
number of bodies = 2560000
2560000 bodies, total time for 10 iterations: 65107.957 ms
= 1006.574 billion interactions per second
= 20131.487 single-precision GFLOP/s at 20 flops per interaction
on Ubuntu18.04, ventus
2560000 bodies, total time for 10 iterations: 69005.547 ms
= 949.721 billion interactions per second
= 18994.415 single-precision GFLOP/s at 20 flops per interaction
매우 좋았다.