Changeset 7530049d for doc


Ignore:
Timestamp:
Apr 8, 2021, 3:14:56 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
56c8b86
Parents:
e07b589
Message:

Minor cleanup

Location:
doc/theses/thierry_delisle_PhD/code/readyQ_proto
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/code/readyQ_proto/relaxed_list.cpp

    re07b589 r7530049d  
    691691
    692692                                for(const auto & n : nodes) {
    693                                         local.valmax = max(local.valmax, size_t(n.value));
    694                                         local.valmin = min(local.valmin, size_t(n.value));
     693                                        local.valmax = std::max(local.valmax, size_t(n.value));
     694                                        local.valmin = std::min(local.valmin, size_t(n.value));
    695695                                }
    696696
     
    773773                                                try {
    774774                                                        arg = optarg = argv[optind];
    775                                                         nnodes = stoul(optarg, &len);
     775                                                        nnodes = std::stoul(optarg, &len);
    776776                                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    777777                                                } catch(std::invalid_argument &) {
     
    792792                                                try {
    793793                                                        arg = optarg = argv[optind];
    794                                                         nnodes = stoul(optarg, &len);
     794                                                        nnodes = std::stoul(optarg, &len);
    795795                                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    796796                                                } catch(std::invalid_argument &) {
     
    812812                                                try {
    813813                                                        arg = optarg = argv[optind];
    814                                                         nnodes = stoul(optarg, &len);
     814                                                        nnodes = std::stoul(optarg, &len);
    815815                                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    816816                                                        nslots = nnodes;
     
    823823                                                try {
    824824                                                        arg = optarg = argv[optind];
    825                                                         nnodes = stoul(optarg, &len);
     825                                                        nnodes = std::stoul(optarg, &len);
    826826                                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    827827                                                } catch(std::invalid_argument &) {
     
    831831                                                try {
    832832                                                        arg = optarg = argv[optind + 1];
    833                                                         nslots = stoul(optarg, &len);
     833                                                        nslots = std::stoul(optarg, &len);
    834834                                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    835835                                                } catch(std::invalid_argument &) {
     
    884884                        case 'd':
    885885                                try {
    886                                         duration = stod(optarg, &len);
     886                                        duration = std::stod(optarg, &len);
    887887                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    888888                                } catch(std::invalid_argument &) {
     
    893893                        case 't':
    894894                                try {
    895                                         nthreads = stoul(optarg, &len);
     895                                        nthreads = std::stoul(optarg, &len);
    896896                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    897897                                } catch(std::invalid_argument &) {
     
    902902                        case 'q':
    903903                                try {
    904                                         nqueues = stoul(optarg, &len);
     904                                        nqueues = std::stoul(optarg, &len);
    905905                                        if(len != arg.size()) { throw std::invalid_argument(""); }
    906906                                } catch(std::invalid_argument &) {
  • doc/theses/thierry_delisle_PhD/code/readyQ_proto/snzi-packed.hpp

    re07b589 r7530049d  
    168168        for(int i = 0; i < width; i++) {
    169169                int idx = i % hwdith;
    170                 std::cout << i << " -> " << idx + width << std::endl;
    171170                leafs[i].parent = &nodes[ idx ];
    172171        }
     
    174173        for(int i = 0; i < root; i++) {
    175174                int idx = (i / 2) + hwdith;
    176                 std::cout << i + width << " -> " << idx + width << std::endl;
    177175                nodes[i].parent = &nodes[ idx ];
    178176        }
  • doc/theses/thierry_delisle_PhD/code/readyQ_proto/snzi.hpp

    re07b589 r7530049d  
    159159        std::cout << "SNZI: " << depth << "x" << width << "(" << mask - 1 << ") " << (sizeof(snzi_t::node) * (root + 1)) << " bytes" << std::endl;
    160160        for(int i = 0; i < root; i++) {
    161                 std::cout << i << " -> " << (i / base) + width << std::endl;
    162161                nodes[i].parent = &nodes[(i / base) + width];
    163162        }
Note: See TracChangeset for help on using the changeset viewer.