{"action":"closed","issue":{"url":"https://api.github.com/repos/patham9/ANSNA/issues/16","repository_url":"https://api.github.com/repos/patham9/ANSNA","labels_url":"https://api.github.com/repos/patham9/ANSNA/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/patham9/ANSNA/issues/16/comments","events_url":"https://api.github.com/repos/patham9/ANSNA/issues/16/events","html_url":"https://github.com/patham9/ANSNA/issues/16","id":365405754,"node_id":"MDU6SXNzdWUzNjU0MDU3NTQ=","number":16,"title":"SDR_SIZE mixes bits and bytes","user":{"login":"jorisbontje","id":620959,"node_id":"MDQ6VXNlcjYyMDk1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/620959?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisbontje","html_url":"https://github.com/jorisbontje","followers_url":"https://api.github.com/users/jorisbontje/followers","following_url":"https://api.github.com/users/jorisbontje/following{/other_user}","gists_url":"https://api.github.com/users/jorisbontje/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisbontje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisbontje/subscriptions","organizations_url":"https://api.github.com/users/jorisbontje/orgs","repos_url":"https://api.github.com/users/jorisbontje/repos","events_url":"https://api.github.com/users/jorisbontje/events{/privacy}","received_events_url":"https://api.github.com/users/jorisbontje/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-01T10:48:17Z","updated_at":"2018-10-02T01:34:40Z","closed_at":"2018-10-02T01:34:40Z","author_association":"NONE","body":"Is `SDR_SIZE` (defined as 2048) meant to be in bit or bytes?\r\nhttps://github.com/patham9/ANSNA/blob/master/src/SDR.h#L22\r\n\r\n`SDR_Permute` uses it as bits, as it does a bitwise swap from 0 to `SDR_SIZE`. Discussion history on IRC/Riot chat seems to confirm the intention of 2048 bits.\r\n\r\nWhile in the SDR.h block struct definition it is used as bytes,  by defining `SDR_NUM_BLOCKS` (=128 blocks of 16 bytes each), resulting in a 16384 bits structure of which only the first 2048 bits are used by various bit operators.\r\n\r\nMy suggestion would be to use bits as unit consistently and address this by redefining\r\nhttps://github.com/patham9/ANSNA/blob/master/src/SDR.h#L25 as:\r\n\r\n```c\r\n#define SDR_BLOCK_SIZE (8 * sizeof(SDR_BLOCK_TYPE))\r\n```"}}
{"actor":{"display_login":"patham9"}}