设为首页 加入收藏

TOP

Caffe源码中各种依赖库的作用及简单使用(三)
2015-11-10 13:45:44 来源: 作者: 【 】 浏览:31
Tags:Caffe 源码 各种 依赖 作用 简单 使用
This example writes data to the HDF5 file
?test_HDF5_write_HDF5_Data();
?// 2-->./examples/h5_read.c:This example reads hyperslab from the SDS.h5 file
?test_HDF5_read_HDF5_data();


?return 0;
}


int test_Snappy()
{
?//http://baike.baidu.com/link?url=X8PCUvwS0MFJF5xS2DdzMrVDj9hNV8VsXL40W_jgiI1DeGNW5q5PsfEbL9RwUSrIilseenbFiulT1ceONYL5E_
?//exaples:./snappy_unittest.cc、snappy-test.cc
?//https://snappy.angeloflogic.com/cpp-tutorial/


?char* filename = "E:/tmp/snappy/fireworks.jpeg";
?size_t input_length = 200;
?snappy_status status;
?size_t output_length = snappy_max_compressed_length(input_length);
?char* output = (char*)malloc(output_length);
?status = snappy_compress(filename, input_length, output, &output_length);
?if (status != SNAPPY_OK) {
? std::cout << "snappy compress fail!" << std::endl;
?}
?free(output);


?size_t output_length1;
?snappy_status status1;
?status1 = snappy_uncompressed_length(filename, input_length, &output_length1);
?if (status != SNAPPY_OK) {
? std::cout << "get snappy uncompress length fail!" << std::endl;
?}
?char* output1 = (char*)malloc(output_length1);
?status1 = snappy_uncompress(filename, input_length, output1, &output_length1);
?if (status != SNAPPY_OK) {
? std::cout << "snappy uncompress fail!" << std::endl;
?}
?free(output1);


?return 0;
}


首页 上一页 1 2 3 4 5 6 下一页 尾页 3/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇AngularJS 的异步服务测试与Mocki.. 下一篇Linux下多线程编程互斥锁和条件变..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: