一、数学计算
#include <math.h>
1、上取整 double ceil(double)
int num; int batchsize = 1000; int batchnum = static_cast<int>(ceil((double)num/batchsize));
2、下取整 double floor(double)
二、计时
#include <windows.h>
clock_t start,end; start = clock(); .... end = clock(); double miaoshu = (double)(end-start) / CLOCKS_PER_SEC;
三、
时间: 2024-12-28 15:02:27