summaryrefslogtreecommitdiff
path: root/expt_0528.cu
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-06-01 16:09:13 +0800
committerKunoiSayami <[email protected]>2023-06-01 16:09:13 +0800
commitd8384bdc4aa7fa1ccc24aec296fac83f1d43a2b4 (patch)
tree31f2dfd29c191596bf6d7275b82826de745943f0 /expt_0528.cu
parent5d373e5db4d1626f085c5f19ab8481f8a0b14226 (diff)
feat: Optimize read_helper library
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'expt_0528.cu')
-rw-r--r--expt_0528.cu12
1 files changed, 9 insertions, 3 deletions
diff --git a/expt_0528.cu b/expt_0528.cu
index 9ac7059..d74c93a 100644
--- a/expt_0528.cu
+++ b/expt_0528.cu
@@ -153,7 +153,13 @@ inline void __cudaCheckError(const char *file, const int line) {
// Definition of generic node class
-class __attribute__((aligned(16))) Node {
+class
+#ifndef _MSC_VER
+ __attribute__((aligned(16)))
+#else
+ __declspec(align(16))
+#endif
+ Node {
public:
int topLevel; // Level of the node
LL key; // Key value
@@ -652,8 +658,8 @@ int main(int argc, char **argv) {
printf("Insertion: %ld, Search: %ld\n", insertion_length, search_length);
- ReadHelper readHelper("normal_distribution.txt", 0, insertion_length);
- readHelper.readFile(nullptr);
+ ReadHelper readHelper("normal_distribution.txt", 0, insertion_length, 0);
+ readHelper.readFile();
std::vector<key_type> _search(readHelper.population_vector.begin(),
readHelper.population_vector.begin() +
search_length);